Events Historical

Provides historical order book events for options contracts, detailing bid and ask levels, volumes, and order counts at specific timestamps to track market depth and activity over time across supported exchanges.

⚠️ IMPORTANT UPDATE ⚠️

⚠️

Important Update

The old endpoint https://api.amberdata.com/market/options/order-book-events/{instrument}/historical has been updated to https://api.amberdata.com/markets/options/order-book-events/{instrument} and is no longer being supported. Please update your integrations accordingly.

See changes here
  • Endpoint URL Change:
    • Old: https://api.amberdata.com/market/options/order-book-events/{instrument}/historical
    • New: https://api.amberdata.com/markets/options/order-book-events/{instrument}
  • Metadata Changes:
    • startDate and endDate fields removed from the response
    • next and api-version fields added to the response
  • Data Structure Changes:
    • The structure of the data array remains largely the same, but there are some additional fields in the new schema.
  • Field Value Changes:
    • Field names and values are largely consistent, but note the renaming of timestamp to exchangeTimestamp and the addition of instrument and exchangeTimestampNanoseconds
  • Other
    • The exchange parameter is now required.
    • The timeInterval parameter is no longer supported.
    • Include the Accept-Encoding: header in your API requests to take advantage of compressed responses.

📘

Time Range Limit

The maximum time range (difference between startDate and endDate) is 1 hour.

In order to get more than the maximum allowed, you can use the startDate & endDate parameters to move the time frame window to get the next n days/hours/minutes of data.

This endpoint is used to retrieve historical data only and is updated every hour. If your query does not return any data, try the hour before using the startDate & endDate parameters.

🚧

Not specifying startDate and endDate

If the startDate and endDate query parameters are not provided, the API will return the data from the previous 10 minutes.


RESPONSE DATA
FieldTypeDescription
metadataobjectThe metadata associated with the data.
metadata.columnsarrayThe name of the columns associated with the returned liquidation data.
metadata.startDatenumber | stringThe first date/time for which data is available.
metadata.endDatenumber | stringThe last date/time for which data is available.
dataobjectThe order book data corresponding to the columns fields, aggregated by exchange.
data[].exchangestringThe name of the exchange, as specified by the filter provided or representing the supported exchanges for this instrument.
data[].timestampnumber | stringThe time at which the event occurred.
data[].timestampNanosecondsnumberThe nanoseconds decimal part of the timestamp.
data[].isBidbooleantrue if the order is a bid, false otherwise.
data[].pricenumberPrice level in the order book.
data[].amountnumberThe number of contracts at the price level (an amount of zero indicates a delete from the order book).
data[].sequencenumberThe sequence number (equal to null if it is not provided by the exchange).
Language
Credentials
Header
Click Try It! to start a request and see the response here!