Apr-Basis Live Term Structure
curl --request GET \
--url https://api.amberdata.com/markets/derivatives/analytics/futures-perpetuals/apr-basis/live-term-structures \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/derivatives/analytics/futures-perpetuals/apr-basis/live-term-structures"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.amberdata.com/markets/derivatives/analytics/futures-perpetuals/apr-basis/live-term-structures', 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/derivatives/analytics/futures-perpetuals/apr-basis/live-term-structures",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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/derivatives/analytics/futures-perpetuals/apr-basis/live-term-structures"
req, _ := http.NewRequest("GET", url, nil)
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/derivatives/analytics/futures-perpetuals/apr-basis/live-term-structures")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/derivatives/analytics/futures-perpetuals/apr-basis/live-term-structures")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"title": "OK",
"description": "Successful request",
"payload": {
"data": [
{
"exchange": "deribit",
"expirationTimestamp": "1718928000000",
"marginType": "coins",
"price": 65208,
"basis": 47,
"apr": 11.03
},
{
"exchange": "huobi",
"expirationTimestamp": "1718928000000",
"marginType": "coins",
"price": 65156,
"basis": -5,
"apr": -1.45
},
{
"exchange": "okex",
"expirationTimestamp": "1718928000000",
"marginType": "coins",
"price": 65192,
"basis": 31,
"apr": 7.26
},
{
"exchange": "binance",
"expirationTimestamp": "1719532800000",
"marginType": "coins",
"price": 65317,
"basis": 156,
"apr": 9.31
},
{
"exchange": "bitmex",
"expirationTimestamp": "1719532800000",
"marginType": "coins",
"price": 65215,
"basis": 53,
"apr": 3.14
},
{
"exchange": "bybit",
"expirationTimestamp": "1719532800000",
"marginType": "coins",
"price": 65290,
"basis": 128,
"apr": 7.66
},
{
"exchange": "deribit",
"expirationTimestamp": "1719532800000",
"marginType": "coins",
"price": 65364,
"basis": 203,
"apr": 12.11
},
{
"exchange": "huobi",
"expirationTimestamp": "1719532800000",
"marginType": "coins",
"price": 65299,
"basis": 138,
"apr": 8.54
},
{
"exchange": "kraken",
"expirationTimestamp": "1719532800000",
"marginType": "coins",
"price": 65250,
"basis": 89,
"apr": 5.15
},
{
"exchange": "okex",
"expirationTimestamp": "1719532800000",
"marginType": "coins",
"price": 65240,
"basis": 78,
"apr": 4.67
},
{
"exchange": "bitmex",
"expirationTimestamp": "1721952000000",
"marginType": "coins",
"price": 65704,
"basis": 542,
"apr": 8.09
},
{
"exchange": "deribit",
"expirationTimestamp": "1721952000000",
"marginType": "coins",
"price": 65859,
"basis": 697,
"apr": 10.45
},
{
"exchange": "okex",
"expirationTimestamp": "1721952000000",
"marginType": "coins",
"price": 65772,
"basis": 610,
"apr": 9.14
},
{
"exchange": "okex",
"expirationTimestamp": "1724976000000",
"marginType": "coins",
"price": 66361,
"basis": 1199,
"apr": 9.28
},
{
"exchange": "binance",
"expirationTimestamp": "1727395200000",
"marginType": "coins",
"price": 67189,
"basis": 2028,
"apr": 11.32
}
]
}
}{}Futures/Perpetuals
Apr-Basis Live Term Structure
This endpoint returns the current quoted futures prices along with the differential to spot and the annualized apr of the spot differential.
GET
/
analytics
/
futures-perpetuals
/
apr-basis
/
live-term-structures
Apr-Basis Live Term Structure
curl --request GET \
--url https://api.amberdata.com/markets/derivatives/analytics/futures-perpetuals/apr-basis/live-term-structures \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/derivatives/analytics/futures-perpetuals/apr-basis/live-term-structures"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.amberdata.com/markets/derivatives/analytics/futures-perpetuals/apr-basis/live-term-structures', 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/derivatives/analytics/futures-perpetuals/apr-basis/live-term-structures",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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/derivatives/analytics/futures-perpetuals/apr-basis/live-term-structures"
req, _ := http.NewRequest("GET", url, nil)
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/derivatives/analytics/futures-perpetuals/apr-basis/live-term-structures")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/derivatives/analytics/futures-perpetuals/apr-basis/live-term-structures")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"title": "OK",
"description": "Successful request",
"payload": {
"data": [
{
"exchange": "deribit",
"expirationTimestamp": "1718928000000",
"marginType": "coins",
"price": 65208,
"basis": 47,
"apr": 11.03
},
{
"exchange": "huobi",
"expirationTimestamp": "1718928000000",
"marginType": "coins",
"price": 65156,
"basis": -5,
"apr": -1.45
},
{
"exchange": "okex",
"expirationTimestamp": "1718928000000",
"marginType": "coins",
"price": 65192,
"basis": 31,
"apr": 7.26
},
{
"exchange": "binance",
"expirationTimestamp": "1719532800000",
"marginType": "coins",
"price": 65317,
"basis": 156,
"apr": 9.31
},
{
"exchange": "bitmex",
"expirationTimestamp": "1719532800000",
"marginType": "coins",
"price": 65215,
"basis": 53,
"apr": 3.14
},
{
"exchange": "bybit",
"expirationTimestamp": "1719532800000",
"marginType": "coins",
"price": 65290,
"basis": 128,
"apr": 7.66
},
{
"exchange": "deribit",
"expirationTimestamp": "1719532800000",
"marginType": "coins",
"price": 65364,
"basis": 203,
"apr": 12.11
},
{
"exchange": "huobi",
"expirationTimestamp": "1719532800000",
"marginType": "coins",
"price": 65299,
"basis": 138,
"apr": 8.54
},
{
"exchange": "kraken",
"expirationTimestamp": "1719532800000",
"marginType": "coins",
"price": 65250,
"basis": 89,
"apr": 5.15
},
{
"exchange": "okex",
"expirationTimestamp": "1719532800000",
"marginType": "coins",
"price": 65240,
"basis": 78,
"apr": 4.67
},
{
"exchange": "bitmex",
"expirationTimestamp": "1721952000000",
"marginType": "coins",
"price": 65704,
"basis": 542,
"apr": 8.09
},
{
"exchange": "deribit",
"expirationTimestamp": "1721952000000",
"marginType": "coins",
"price": 65859,
"basis": 697,
"apr": 10.45
},
{
"exchange": "okex",
"expirationTimestamp": "1721952000000",
"marginType": "coins",
"price": 65772,
"basis": 610,
"apr": 9.14
},
{
"exchange": "okex",
"expirationTimestamp": "1724976000000",
"marginType": "coins",
"price": 66361,
"basis": 1199,
"apr": 9.28
},
{
"exchange": "binance",
"expirationTimestamp": "1727395200000",
"marginType": "coins",
"price": 67189,
"basis": 2028,
"apr": 11.32
}
]
}
}{}Authorizations
Query Parameters
[Required] The underlying currency for which there are futures contracts/instruments.
[Examples] BTC | ETH
[Required] This is the type of margin for the perpetuals. Perpetuals are either settled in stable coins or underlying currency coins..
[Examples] coins | stables
[Optional] Time format of the timestamps in the return payload.
[Defaults] milliseconds | ms* | iso | iso8601 | hr | human_readable
Was this page helpful?
⌘I