Retrieves the order book (bids and asks) for a given instrument ID, along with other market values such as best bid/ask prices, last trade price, mark price, and index price.
This method is similar to get_order_book but uses instrument ID instead of instrument name. The order book depth can be controlled using the depth parameter, which accepts values from 1 to 10000.
Request
- Base URLhttps://test.deribit.com/api/v2
- URLhttps://test.deribit.com/api/v2/public/get_order_book_by_instrument_id
- Authnone declared
Query parameters
The instrument ID for which to retrieve the order book, see public/get_instruments to obtain instrument IDs.
The number of entries to return for bids and asks, maximum - 10000.
Response
Success response
Example response
{
"result": {
"instrument_name": "BTC-PERPETUAL",
"timestamp": 1536569522277,
"stats": {
"price_change": 10.23
},
"index_price": 8247.27
}
}Changes
- breaking
the response property
//became nullable for the status - breaking
the response property
//became nullable for the status - breaking
the response property
//became nullable for the status - info
added the optional property
//to the response with the status
- breaking