SUBSCRIBE Orderbook
UPDATE TIME
Real Time
REQUEST
<tr>
<td>
* \*data\*\* <span class="ws-data-type ws-small-font">array of strings</span> <span class="ws-required-tag ws-small-font">required</span>
Channel name in the format `orderbook:SYMBOL`. Eg. `orderbook:ETH-31MAR23-1350-C`
</td>
</tr> </th>
</tr>* \*op\*\* string required Operation code allowed values: `subscribe` `unsubscribe`
Example
{
"op":"subscribe",
"data": ["orderbook:ETH-31MAR23-1350-C"]
}
RESPONSE
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
* *channel** <span class="ws-data-type ws-small-font">string</span> <span class="ws-required-tag ws-small-font">required</span>
Channel name in the format orderbook:INSTRUMENT_NAME. Eg. orderbook:ETH-31MAR23-1350-C
</td>
</tr>
<tr>
<td>
<span class="ws-small-font">data.</span>type <span class="ws-data-type ws-small-font">string</span> <span class="ws-required-tag ws-small-font">required</span>
Type of orderbook message. Allowed values: snapshot update
</td>
</tr>
<tr>
<td>
<span class="ws-small-font">data.</span>instrument_id <span class="ws-data-type ws-small-font">string</span> <span class="ws-required-tag ws-small-font">required</span>
Instrument ID number. Eg. 12
</td>
</tr>
<tr>
<td>
<span class="ws-small-font">data.</span>instrument_name <span class="ws-data-type ws-small-font">string</span> <span class="ws-required-tag ws-small-font">required</span>
Instrument symbol. Eg. ETH-24DEC22-1250-C
</td>
</tr>
<tr>
<td>
<span class="ws-small-font">data.</span>instrument_type <span class="ws-data-type ws-small-font">string</span> <span class="ws-required-tag ws-small-font">required</span>
Type of instrument. Allowed values: OPTION PERPETUAL
</td>
</tr>
<tr>
<td>
<span class="ws-small-font">data.</span>bids <span class="ws-data-type ws-small-font">array of arrays</span> <span class="ws-required-tag ws-small-font">required</span>
Array of 3 elements - price in USD, contract amount and order IV. Eg.[["1", "10", "0.75"]]
</td>
</tr>
<tr>
<td>
<span class="ws-small-font">data.</span>asks <span class="ws-data-type ws-small-font">array of arrays</span> <span class="ws-required-tag ws-small-font">required</span>
Array of 3 elements - price in USD, contract amount and order IV. Eg.[["1", "10", "0.85"]]
</td>
</tr>
<tr>
<td>
<span class="ws-small-font">data.</span>last_updated <span class="ws-data-type ws-small-font">string</span> <span class="ws-required-tag ws-small-font">required</span>
Last updated timestamp in UNIX timestamp in nanoseconds. Eg. 1680249600000000000
</td>
</tr>
<tr>
<td>
<span class="ws-small-font">data.</span>checksum <span class="ws-data-type ws-small-font">string</span> <span class="ws-required-tag ws-small-font">required</span>
Payload checksum. Eg. 1321749405
</td>
</tr>
</tbody>Example
{
"channel": "orderbook:ETH-31MAR23-1350-C",
"data": {
"type": "update",
"instrument_id": "165",
"instrument_name": "ETH-31MAR23-1350-C",
"instrument_type": "OPTION",
"bids": [
[
"1",
"10",
"0.75"
]
],
"asks": [
[
"10",
"1",
"0.85"
]
],
"last_updated": "1673436052887313432",
"checksum": "1321749405"
}
}
📘 Note!
Bid or ask contract amount can be 0. This indicates that the price level has been removed from the orderbook.
Last updated