Retrieves the historical (time series) trade data for the specified instrument.
Important Update
The old endpoint
https://api.amberdata.com/market/options/trades/{instrument}/historical
has been updated tohttps://api.amberdata.com/markets/options/trades/{instrument}
. The old endpoint will be deprecated on 2024-10-31. Please update your integrations accordingly.See changes here
- Endpoint URL Change:
- Old:
https://api.amberdata.com/market/options/trades/{instrument}/historical
- New:
https://api.amberdata.com/markets/options/trades/{instrument}
- Metadata Changes:
- New fields
api-version
andnext
are introduced in the metadata object.startDate
,endDate
, andcolumns
fields were removed.- Data Structure Changes:
- Previously, the
data
structure was an array of arrays.- The new
data
structure an array of JSON objects.- Field Changes:
exchangeTimestamp
: Replacestimestamp
exchangeTimestampNanoseconds
: ReplacestimestampNanoseconds
isBuySide
: ReplacesisBuy
quoteVolume
: ReplacesquoteSize
sequence
: ReplacestradeSequence
underlyingIndex
: New fieldunderlyingPrice
: New field- Other
- 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.
Not specifying startDate and endDate
If the startDate and endDate query parameters are not provided, the API will return the data from the previous hour.
RESPONSE DATA
Field | Type | Description |
---|---|---|
metadata | object | The metadata associated with the data. |
metadata.columns | array | The name of the columns associated with the returned liquidation data. |
metadata.startDate | number | string | The first date/time for which data is available. |
metadata.columns | number | string | The last date/time for which data is available. |
data[] | array | The trade data corresponding to the columns fields, aggregated by exchange. |
data[].exchange | string | The name of the exchange, as specified by the filter provided or representing the supported exchanges for this instrument. |
data[].timestamp | number | string | The time at which the event occurred. |
data[].timestampNanoseconds | number | The nanosecond part of the timestamp where applicable. |
data[].isBid | boolean | true if the trade is a buy, false otherwise. |
data[].price | numeric | The price at which the asset was traded. |
data[].volume | numeric | The total amount of that asset that was traded. |
data[].tradeId | number | string | The exchange provided id of the trade. |
data[].quoteSize | numeric | Quote size at the moment of trade |
data[].tradeSequence | string | The sequence number (equal to null if it is not provided by the exchange). |
data[].tickDirection | interger | Direction of the "tick" |
data[].markPrice | numeric | Mark price at the moment of trade |
data[].iv | numeric | Option implied volatility for the price |
data[].indexPrice | numeric | Index price at the moment of trade |