curl --request GET \
--url https://api.amberdata.com/markets/derivatives/analytics/futures-perpetuals/open-interest-total \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/derivatives/analytics/futures-perpetuals/open-interest-total"
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/open-interest-total', 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/open-interest-total",
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/open-interest-total"
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/open-interest-total")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/derivatives/analytics/futures-perpetuals/open-interest-total")
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": "huobi",
"timestamp": 1715385600000,
"coin": 2422.5065079067244,
"usd": 147.31088485102083
},
{
"exchange": "kraken",
"timestamp": 1715385600000,
"coin": 3127.0053168195695,
"usd": 190.48881954960004
},
{
"exchange": "bitmex",
"timestamp": 1715385600000,
"coin": 6929.464631763672,
"usd": 372.08792198369997
},
{
"exchange": "deribit",
"timestamp": 1715385600000,
"coin": 25049.827686538036,
"usd": 1547.513314212
},
{
"exchange": "okex",
"timestamp": 1715385600000,
"coin": 43135.73797192597,
"usd": 2635.6437946363894
},
{
"exchange": "bybit",
"timestamp": 1715385600000,
"coin": 76781.5822092026,
"usd": 4669.033820516301
},
{
"exchange": "binance",
"timestamp": 1715385600000,
"coin": 111446.26808003098,
"usd": 6787.6393313128
},
{
"exchange": "cme",
"timestamp": 1715385600000,
"coin": 133229.59999999995,
"usd": 8186.2328186800005
},
{
"exchange": "huobi",
"timestamp": 1715299200000,
"coin": 2243.9724956417745,
"usd": 141.33601091870173
},
{
"exchange": "kraken",
"timestamp": 1715299200000,
"coin": 3210.220565067225,
"usd": 203.0752266112
},
{
"exchange": "bitmex",
"timestamp": 1715299200000,
"coin": 6749.902349060866,
"usd": 374.4837635761
}
]
}
}{}Open Interest
This endpoint returns the total asset open interest for both futures and perpetuals across the various exchanges. The open interest is returns in raw coin amounts and millions of dollars.
curl --request GET \
--url https://api.amberdata.com/markets/derivatives/analytics/futures-perpetuals/open-interest-total \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/derivatives/analytics/futures-perpetuals/open-interest-total"
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/open-interest-total', 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/open-interest-total",
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/open-interest-total"
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/open-interest-total")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amberdata.com/markets/derivatives/analytics/futures-perpetuals/open-interest-total")
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": "huobi",
"timestamp": 1715385600000,
"coin": 2422.5065079067244,
"usd": 147.31088485102083
},
{
"exchange": "kraken",
"timestamp": 1715385600000,
"coin": 3127.0053168195695,
"usd": 190.48881954960004
},
{
"exchange": "bitmex",
"timestamp": 1715385600000,
"coin": 6929.464631763672,
"usd": 372.08792198369997
},
{
"exchange": "deribit",
"timestamp": 1715385600000,
"coin": 25049.827686538036,
"usd": 1547.513314212
},
{
"exchange": "okex",
"timestamp": 1715385600000,
"coin": 43135.73797192597,
"usd": 2635.6437946363894
},
{
"exchange": "bybit",
"timestamp": 1715385600000,
"coin": 76781.5822092026,
"usd": 4669.033820516301
},
{
"exchange": "binance",
"timestamp": 1715385600000,
"coin": 111446.26808003098,
"usd": 6787.6393313128
},
{
"exchange": "cme",
"timestamp": 1715385600000,
"coin": 133229.59999999995,
"usd": 8186.2328186800005
},
{
"exchange": "huobi",
"timestamp": 1715299200000,
"coin": 2243.9724956417745,
"usd": 141.33601091870173
},
{
"exchange": "kraken",
"timestamp": 1715299200000,
"coin": 3210.220565067225,
"usd": 203.0752266112
},
{
"exchange": "bitmex",
"timestamp": 1715299200000,
"coin": 6749.902349060866,
"usd": 374.4837635761
}
]
}
}{}Authorizations
Query Parameters
[Required] The underlying currency for which there are futures contracts/instruments.
[Examples] BTC | ETH
[Required] Payload only includes data after this date (inclusive).
[Formats] seconds | milliseconds | iso8601
[Examples] 1578531600 | 1578531600000 | 2020-09-01T01:00:00
[Required] Payload only includes data before this date (exclusive).
[Formats] seconds | milliseconds | iso8601
[Examples] 1578531600 | 1578531600000 | 2020-09-01T01:00:00
[Optional] Time format of the timestamps in the return payload.
[Defaults] milliseconds | ms* | iso | iso8601 | hr | human_readable
Was this page helpful?