curl --request GET \
--url https://api.amberdata.com/markets/futures/liquidations/{instrument} \
--compressed \
--header 'Accept-Encoding: <accept-encoding>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/futures/liquidations/{instrument}"
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/liquidations/{instrument}', 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/liquidations/{instrument}",
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/liquidations/{instrument}"
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/liquidations/{instrument}")
.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/liquidations/{instrument}")
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": "https://api.amberdata.com/markets/futures/liquidations/BTCUSDT?cursor=N4IgpgHgxgFghgOwOZhALhAIwJYMVVAGhCgFcAnAZwHtz0FSAbR4ygFznLYBE43U0ARgDsIgKxiADAE5hADkEAmOcTAIAJr37oRIgGySALIKWHF04riiNS6sAFUElUgAcXtfuoCi0eMjCU6ABmcIyUYMRs2AC2YABitNF86CDR2MzY4VDUGoHEQYnJGABWNAggrB4A0mAAnim6whIy8kpyAPqS7Th4CATtAEIAKgDC9gDK3EPtogDMgmIAdAudi5JGIAC%2BQA",
"api-version": "2023-09-30"
},
"data": [
{
"instrument": "BTCUSDT",
"exchange": "binance",
"exchangeTimestamp": 1717517743430,
"exchangeTimestampNanoseconds": 0,
"action": null,
"orderId": null,
"side": "BUY",
"status": "FILLED",
"timeInForce": "IOC",
"type": "LIMIT",
"price": 70913.39,
"volume": 0.002,
"unit": "base_asset",
"positionType": "SHORT"
},
{
"instrument": "BTCUSDT",
"exchange": "binance",
"exchangeTimestamp": 1717517764608,
"exchangeTimestampNanoseconds": 0,
"action": null,
"orderId": null,
"side": "BUY",
"status": "FILLED",
"timeInForce": "IOC",
"type": "LIMIT",
"price": 70929.32,
"volume": 0.002,
"unit": "base_asset",
"positionType": "SHORT"
}
]
}
}"{}"Historical
Provides historical liquidation data for futures instruments, including timestamps, order details, price, volume, and position type for each liquidation event across exchanges.
curl --request GET \
--url https://api.amberdata.com/markets/futures/liquidations/{instrument} \
--compressed \
--header 'Accept-Encoding: <accept-encoding>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.amberdata.com/markets/futures/liquidations/{instrument}"
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/liquidations/{instrument}', 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/liquidations/{instrument}",
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/liquidations/{instrument}"
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/liquidations/{instrument}")
.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/liquidations/{instrument}")
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": "https://api.amberdata.com/markets/futures/liquidations/BTCUSDT?cursor=N4IgpgHgxgFghgOwOZhALhAIwJYMVVAGhCgFcAnAZwHtz0FSAbR4ygFznLYBE43U0ARgDsIgKxiADAE5hADkEAmOcTAIAJr37oRIgGySALIKWHF04riiNS6sAFUElUgAcXtfuoCi0eMjCU6ABmcIyUYMRs2AC2YABitNF86CDR2MzY4VDUGoHEQYnJGABWNAggrB4A0mAAnim6whIy8kpyAPqS7Th4CATtAEIAKgDC9gDK3EPtogDMgmIAdAudi5JGIAC%2BQA",
"api-version": "2023-09-30"
},
"data": [
{
"instrument": "BTCUSDT",
"exchange": "binance",
"exchangeTimestamp": 1717517743430,
"exchangeTimestampNanoseconds": 0,
"action": null,
"orderId": null,
"side": "BUY",
"status": "FILLED",
"timeInForce": "IOC",
"type": "LIMIT",
"price": 70913.39,
"volume": 0.002,
"unit": "base_asset",
"positionType": "SHORT"
},
{
"instrument": "BTCUSDT",
"exchange": "binance",
"exchangeTimestamp": 1717517764608,
"exchangeTimestampNanoseconds": 0,
"action": null,
"orderId": null,
"side": "BUY",
"status": "FILLED",
"timeInForce": "IOC",
"type": "LIMIT",
"price": 70929.32,
"volume": 0.002,
"unit": "base_asset",
"positionType": "SHORT"
}
]
}
}"{}"BitMEX Volume Calculation Warning
BitMEX Volume Calculation Warning
volume field represents the number of contracts traded, not the volume in the base asset.To obtain the correct volume, users must adjust for contract size using the underlyingToPositionMultiplier from our Reference endpoint.For details on this calculation and how to retrieve the correct values, see our Changelog Update.startDate and endDate) is 731 days (2 years).Authorizations
Path Parameters
The futures instrument for which data will be retrieved.
Query Parameters
The exchange for which data should be retrieved. Only 1 exchange is allowed.
[Optional] Payload only includes data after this date (inclusive). [Formats] seconds | milliseconds | iso8601 [Examples] 1578531600 | 1578531600000 | 2020-09-01T01:00:00
[Optional] 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.
milliseconds, ms*, iso, iso8601, hr, human_readable [Optional] Specifies the direction in which the data is sorted (by timestamp). [Defaults] asc (ascending order). [Usage Conditions] This parameter can only be used if the startDate and endDate timeframe is within the most recent 24 hours, or if the startDate and endDate parameters are not used at all. [Examples] ascending | descending | asc | desc
Was this page helpful?