Batch Historical (SWAPS only)

Provides batched historical open interest data for multiple perpetual futures instruments within a specified date range, including timestamps, open interest values, and contract types across exchanges.

❗️

Important Notice: Upcoming Changes to Batch Endpoints

Please take a moment to review the change log details here!


📘

Time Range Limit

The maximum time range (difference between startDate and endDate) is:

  • 62 days of daily, hourly or minutely data

In order to get more than the maximum allowed, you can use the Historical endpoint found here .


🚧

Not specifying startDate and endDate

If the startDate and endDate query parameters are not provided, the API will return the previous 62 days of daily data.

RESPONSE DATA
JSON Field/PathValue TypeDescription
payload.metadata.nextstringThe URL for the next page of data (nullable if there is no next page).
payload.metadata.api-versionstringThe version of the API used for this request.
payload.data[].instrumentstringThe instrument or trading pair for which open interest data is recorded (e.g., BTCUSD_PERP).
payload.data[].exchangestringThe name of the exchange where the open interest data applies (e.g., binance).
payload.data[].exchangeTimestampintegerThe timestamp from the exchange when the open interest data was recorded.
payload.data[].exchangeTimestampNanosecondsintegerThe nanoseconds part of the timestamp, representing sub-second precision (usually 0).
payload.data[].valueintegerThe open interest value at the specified timestamp.
payload.data[].typestringThe type of the open interest contract (e.g., PERPETUAL).
Path Params
string
required
Defaults to huobi

The exchange for which to retrieve the most current data.

Query Params
string
required
Defaults to BTC-USDT,ETH-USDT

[Required] The instrument(s) for which to retrieve the most current data (comma separated).
[Maximum] 50 instruments

date-time

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

date-time

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

string

[Optional] Time interval.
[Defaults] minutes | hours | days*

string

[Optional] Time format of the timestamps in the return payload.
[Defaults] milliseconds | ms* | iso | iso8601 | hr | human_readable

Responses

Language
Credentials
Click Try It! to start a request and see the response here! Or choose an example:
application/json