Limited Depth of Market Information
Subscribe URL
wss://stream.bittap.com/endpoint?format=JSON
Subscribe Parameters
Stream Name: s_depth<level>@<symbol>_scale
| Parameter | Description |
|---|---|
| level | indicates the number of bid and ask orders, The default value for level is 30. |
| symbol | Trading Pair |
| scale | indicates the aggregation precision, The value for scale can be found in the depth and precision settings of the trading pair. |
Data Update
| Name | Type | Description |
|---|---|---|
| e | STRING | Topic |
| s | STRING | symbol |
| i | STRING | aggregation precision |
| lastUpdateId | LONG | last update id |
| bids | ARRAY | bids |
| asks | ARRAY | asks |
Subscribe Example
{
"method": "SUBSCRIBE",
"params": [
"s_depth1@BTC-USDT_0.01"
],
"id": "eru1bat"
}Subscribe Success Example
{
"code": 0, // 0 means success, non-0 means failure
"msg":"", // failure reason, null when success
"topic": ["", ""], // topics that failed to subscribe
"id": 1
}Data Update Example
{
"e": "s_depth30", //topic
"s": "BTC-USDT", //symbol
"i": "0.01", //aggregation precision
"lastUpdateId": 1777735424, //last update id
"bids": [ //bids
[
"106610.65", //price
"2.028125" //quantity
]
],
"asks": [ //asks
[
"106610.66",
"2.90337"
]
]
}Unsubscribe Example
{
"method": "UNSUBSCRIBE",
"params": [
"s_depth1@BTC-USDT_0.01"
],
"id": "eru1bat"
}Error Codes
No information available
Code Example
Last updated on: