Provides detailed historical trade data for a specific options instrument, including the trade's timestamp, side (buy or sell), price, volume, and other relevant metrics like the index price, mark price, and implied volatility (IV) at the time of the trade.

get/options/trades/{instrument}

Request

  • Base URL
    https://api.amberdata.com/markets
  • URL
    https://api.amberdata.com/markets/options/trades/{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

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

startDatestring date-time

[Optional] Payload only includes data after this date (inclusive). [Defaults] Beginning of the current hour (max time range is 1 hour). [Formats] seconds | milliseconds | iso8601 [Examples] 1578531600 | 1578531600000 | 2020-09-01T01:00:00

endDatestring date-time

[Optional] Payload only includes data before this date (exclusive). [Defaults] One hour after the beginning of the current hour (max time range is 1 hour). [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-16AUG24-50000-P",
        "exchange": "bybit",
        "exchangeTimestamp": 1722412049804,
        "isBuySide": true,
        "price": 25,
        "volume": 0.1,
        "tradeId": "8212ab1b-88f9-5c3b-a55d-2bf79a805e11",
        "indexPrice": 66292.12,
        "markPrice": 39.59685034,
        "underlyingPrice": 66607.93,
        "iv": 0.6291
      }
    ]
  }
}

Changes