Provides historical open interest data for options contracts, detailing the total number of outstanding contracts at specific timestamps to help assess market interest over time across supported exchanges.

get/options/open-interest/{instrument}

Request

  • Base URL
    https://api.amberdata.com/markets
  • URL
    https://api.amberdata.com/markets/options/open-interest/{instrument}
  • Auth
    API key in header x-api-key

Path parameters

instrumentstring required

The instrument for which to retrieve the requested data.

Query parameters

exchangestring required

[Optional] The exchange(s) for which to retrieve the requested data (comma separated). [Defaults] All available exchanges.

startDatestring date-time

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

endDatestring date-time

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

timeFormatstring

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

sortDirectionstring

[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

Headers

Accept-Encodingstring required
api-versionstring

Response

200

statusinteger
titlestring
descriptionstring

Example response

{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "metadata": {
      "api-version": "2023-09-30"
    },
    "data": [
      {
        "instrument": "BTC-29DEC23-30000-C",
        "exchange": "deribit",
        "exchangeTimestamp": 1690156800895,
        "value": 2603.5
      }
    ]
  }
}

Changes