Batch Historical
curl --request GET \
--url https://api.amberdata.com/markets/futures/batch-funding-rates/{exchange} \
--compressed \
--header 'Accept-Encoding: <accept-encoding>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/futures/batch-funding-rates/{exchange}"
headers = {
"Accept-Encoding": "<accept-encoding>",
"x-api-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Accept-Encoding': '<accept-encoding>', 'x-api-key': '<api-key>'}
};
fetch('https://api.amberdata.com/markets/futures/batch-funding-rates/{exchange}', 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://api.amberdata.com/markets/futures/batch-funding-rates/{exchange}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Accept-Encoding: <accept-encoding>",
"x-api-key: <api-key>"
],
]);
$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://api.amberdata.com/markets/futures/batch-funding-rates/{exchange}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept-Encoding", "<accept-encoding>")
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.amberdata.com/markets/futures/batch-funding-rates/{exchange}")
.header("Accept-Encoding", "<accept-encoding>")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/futures/batch-funding-rates/{exchange}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept-Encoding"] = '<accept-encoding>'
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"title": "OK",
"description": "Successful request",
"payload": {
"metadata": {
"next": null,
"api-version": "2023-09-30"
},
"data": [
{
"instrument": "BTCUSDT",
"exchangeTimestamp": 1735948800000,
"fundingInterval": null,
"fundingRate": 0.00000798,
"nextFundingRate": null,
"nextFundingTime": null,
"isActualFundingRate": true
},
{
"instrument": "ETHUSDT",
"exchangeTimestamp": 1735948800000,
"fundingInterval": null,
"fundingRate": 0.0001,
"nextFundingRate": null,
"nextFundingTime": null,
"isActualFundingRate": true
}
]
}
}"{}"Funding Rates
Batch Historical
Returns batched historical funding rate data for futures instruments within a specified date range, including timestamps, actual funding rates, and projected rates across exchanges.
GET
/
futures
/
batch-funding-rates
/
{exchange}
Batch Historical
curl --request GET \
--url https://api.amberdata.com/markets/futures/batch-funding-rates/{exchange} \
--compressed \
--header 'Accept-Encoding: <accept-encoding>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/futures/batch-funding-rates/{exchange}"
headers = {
"Accept-Encoding": "<accept-encoding>",
"x-api-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Accept-Encoding': '<accept-encoding>', 'x-api-key': '<api-key>'}
};
fetch('https://api.amberdata.com/markets/futures/batch-funding-rates/{exchange}', 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://api.amberdata.com/markets/futures/batch-funding-rates/{exchange}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Accept-Encoding: <accept-encoding>",
"x-api-key: <api-key>"
],
]);
$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://api.amberdata.com/markets/futures/batch-funding-rates/{exchange}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept-Encoding", "<accept-encoding>")
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.amberdata.com/markets/futures/batch-funding-rates/{exchange}")
.header("Accept-Encoding", "<accept-encoding>")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/futures/batch-funding-rates/{exchange}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept-Encoding"] = '<accept-encoding>'
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"title": "OK",
"description": "Successful request",
"payload": {
"metadata": {
"next": null,
"api-version": "2023-09-30"
},
"data": [
{
"instrument": "BTCUSDT",
"exchangeTimestamp": 1735948800000,
"fundingInterval": null,
"fundingRate": 0.00000798,
"nextFundingRate": null,
"nextFundingTime": null,
"isActualFundingRate": true
},
{
"instrument": "ETHUSDT",
"exchangeTimestamp": 1735948800000,
"fundingInterval": null,
"fundingRate": 0.0001,
"nextFundingRate": null,
"nextFundingTime": null,
"isActualFundingRate": true
}
]
}
}"{}"The maximum time range (difference between
startDate and endDate) is:- 62 days of daily, hourly or minutely data
- This endpoint only stores the most recent 62 days of data.
- Queries with a startDate older than 62 days from the current date will result in a 410 error.
If you omit
startDate and endDate, the API will return the most recent 62 days of daily data (not data older than 62 days from the current date).Path Parameters
Query Parameters
Was this page helpful?