GET
/
futures
/
open-interest
/
{instrument}
Historical
curl --request GET \
  --url https://api.amberdata.com/markets/futures/open-interest/{instrument} \
  --compressed \
  --header 'Accept-Encoding: <accept-encoding>' \
  --header 'x-api-key: <api-key>'
{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "metadata": {
      "next": "https://api.amberdata.com/markets/futures/open-interest/BTCUSD_PERP?cursor=N4IgpgHgxgFghgOwOZhALhAIwJYMVVAGhCgFcAnAZwHtz0FSAbR4ygFznLYBE43U0ARgDsIgKwAWABwAGCQCYAzMLHEwCACa9%2B6ESIBscidJmDFxXFEakNYAKoJKpAA7Pa-DQFFo8ZGEroAGZwjJRgxGzYALZgAGK0UXzoIFHYzNhhUNSaAcSBCUkYAFY0CCCs7gDSYACeyXoqJgrKYgD6Mq04eAgErQBCACoAwnYAytytAAqeAEqTIAC%2BQA",
      "api-version": "2023-09-30"
    },
    "data": [
      {
        "instrument": "BTCUSD_PERP",
        "exchange": "binance",
        "exchangeTimestamp": 1717518065771,
        "exchangeTimestampNanoseconds": 0,
        "value": 16862174,
        "type": "PERPETUAL"
      },
      {
        "instrument": "BTCUSD_PERP",
        "exchange": "binance",
        "exchangeTimestamp": 1717518157220,
        "exchangeTimestampNanoseconds": 0,
        "value": 16865368,
        "type": "PERPETUAL"
      },
      {
        "instrument": "BTCUSD_PERP",
        "exchange": "binance",
        "exchangeTimestamp": 1717518218262,
        "exchangeTimestampNanoseconds": 0,
        "value": 16866686,
        "type": "PERPETUAL"
      }
    ]
  }
}
The maximum time range (difference between startDate and endDate) is 731 days (2 years).
If the startDate and endDate query parameters are not provided, the API will return the data from the previous 24 hours at the tick granularity.

Authorizations

x-api-key
string
header
required

Headers

Accept-Encoding
string
default:gzip, deflate, br
required
api-version
string

Path Parameters

instrument
string
default:BTCUSD_PERP
required

The futures instrument for which data will be retrieved.

Query Parameters

exchange
string
default:binance
required

The exchange for which data should be retrieved. Only 1 exchange is allowed.

startDate
string<date-time>

[Optional] Payload only includes data after this date (inclusive). [Formats] seconds | milliseconds | iso8601 [Examples] 1578531600 | 1578531600000 | 2020-09-01T01:00:00

endDate
string<date-time>

[Optional] Payload only includes data before this date (exclusive). [Formats] seconds | milliseconds | iso8601 [Examples] 1578531600 | 1578531600000 | 2020-09-01T01:00:00

timeFormat
enum<string>
default:hr

[Optional] Time format of the timestamps in the return payload.

Available options:
milliseconds,
ms*,
iso,
iso8601,
hr,
human_readable
sortDirection
string

[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

Response

200
application/json

200

The response is of type object.