get https://api.amberdata.com/markets/spot/order-book-snapshots/
Delivers historical order book snapshots for specified Spot market trading pairs, including detailed bid and ask levels, volume, and order count per price level, along with timestamps to track market depth over time.
Time Range Limit
The maximum time range (difference between startDate and endDate) is 731 days (2 years).
Not specifying startDate and endDate
If the startDate and endDate query parameters are not provided, the API will return the data from the previous 24 hours.
RESPONSE DATA
Fields and paths are relative to the top-level payload
field i.e. metadata.next
is equivalent to payload.metadata.next
.
JSON Field/Path | Value Type | Description |
---|---|---|
payload.metadata.requestedStartDate | number | The timestamp in milliseconds for the start date that was requested by the client. |
payload.metadata.requestedEndDate | number | The timestamp in milliseconds for the end date that was requested by the client. |
payload.metadata.returnedStartDate | number | The timestamp in milliseconds for the actual start date of the data returned by the API. |
payload.metadata.returnedEndDate | number | The timestamp in milliseconds for the actual end date of the data returned by the API. |
payload.metadata.next | string | The URL for the next page of results, if there are more results to fetch. It is a paginated cursor that allows the client to retrieve subsequent data. |
payload.metadata.api-version | string | The version of the API being used, indicated as a date string in the format YYYY-MM-DD. |
payload.data[{index}].exchange | string | The name of the exchange where the data originates, such as "bitfinex". |
payload.data[{index}].instrument | string | The trading pair or instrument identifier, such as "eth_usd". |
payload.data[{index}].timestamp | number | The timestamp in milliseconds for when the order book snapshot was captured. |
payload.data[{index}].exchangeTimestamp | number | The timestamp from the exchange in milliseconds for when the order book snapshot was captured. Can be null if not provided by the exchange. |
payload.data[{index}].exchangeTimestampNanoseconds | number | The timestamp from the exchange in nanoseconds, offering a more precise time for when the order book snapshot was captured. Can be null if not provided by the exchange. |
payload.data[{index}].sequence | number | The sequence number for the order book snapshot, if provided by the exchange. Can be null. |
payload.data[{index}].ask[{askIndex}].price | number | The price level of the ask order. |
payload.data[{index}].ask[{askIndex}].volume | number | The volume at the specified ask price level. |
payload.data[{index}].ask[{askIndex}].numOrders | number | The number of orders at the specified ask price level. |
payload.data[{index}].bid[{bidIndex}].price | number | The price level of the bid order. |
payload.data[{index}].bid[{bidIndex}].volume | number | The volume at the specified bid price level. |
payload.data[{index}].bid[{bidIndex}].numOrders | number | The number of orders at the specified bid price level. |