cURL
curl --request GET \
--url https://test.deribit.com/api/v2/public/get_funding_chart_dataimport requests
url = "https://test.deribit.com/api/v2/public/get_funding_chart_data"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://test.deribit.com/api/v2/public/get_funding_chart_data', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.deribit.com/api/v2/public/get_funding_chart_data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://test.deribit.com/api/v2/public/get_funding_chart_data"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://test.deribit.com/api/v2/public/get_funding_chart_data")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.deribit.com/api/v2/public/get_funding_chart_data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"result": {
"current_interest": 0.005000670552845,
"interest_8h": 0.0040080896931,
"data": [
{
"timestamp": 1536569522277,
"index_price": 8247.27,
"interest_8h": 0.004999511380756577
}
]
},
"id": 123
}Market Data
public/get_funding_chart_data
Retrieves funding rate chart data points for a PERPETUAL instrument within a given time period. The data is formatted for use in charting applications and includes funding rate values at regular intervals.
Use the length parameter to specify the time period for which to retrieve chart data. This method is useful for visualizing funding rate trends over time.
cURL
curl --request GET \
--url https://test.deribit.com/api/v2/public/get_funding_chart_dataimport requests
url = "https://test.deribit.com/api/v2/public/get_funding_chart_data"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://test.deribit.com/api/v2/public/get_funding_chart_data', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.deribit.com/api/v2/public/get_funding_chart_data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://test.deribit.com/api/v2/public/get_funding_chart_data"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://test.deribit.com/api/v2/public/get_funding_chart_data")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.deribit.com/api/v2/public/get_funding_chart_data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"result": {
"current_interest": 0.005000670552845,
"interest_8h": 0.0040080896931,
"data": [
{
"timestamp": 1536569522277,
"index_price": 8247.27,
"interest_8h": 0.004999511380756577
}
]
},
"id": 123
}Query Parameters
Instrument name Unique instrument identifier
Example:
"BTC-PERPETUAL"
Specifies time period. 8h - 8 hours, 24h - 24 hours, 1m - 1 month
Available options:
8h, 24h, 1m Response
200 - application/json
Success response
The JSON-RPC version (2.0)
Available options:
2.0 Hide child attributes
Hide child attributes
Current interest
Example:
0.005000670552845
Current interest 8h
Example:
0.0040080896931
The id that was sent in the request
Was this page helpful?