Otherbook- Increment
wss://ws-api-futures.kucoin.com
Topic: /contractMarket/level2:{symbol}
Description
Subscribe Message
{
"id": 1545910660739,
"type": "subscribe",
"topic": "/contractMarket/level2:XBTUSDTM",
"response": true
}
Response
Data Schema
orderbookIncrement
topic
string
required
type
string
required
subject
string
required
sn
integer <int64>
required
data
object
required
sequence
integer <int64>
required
change
string
required
timestamp
integer <int64>
required
Example
{
"topic": "/contractMarket/level2:XBTUSDTM",
"type": "message",
"subject": "level2",
"sn": 1709400450243,
"data": {
"sequence": 1709400450243,
"change": "90631.2,sell,2",
"timestamp": 1731897467182
}
}
Local order book construction procedure
1.
2.
3.
4.
5.
6.
{
"sequence": 16,
"asks": [
["3988.59", 3],
["3988.60", 47],
["3988.61", 32],
["3988.62", 8]
],
"bids": [
["3988.51", 56],
["3988.50", 15],
["3988.49", 100],
["3988.48", 10]
]
}
Price | Size | Side |
---|---|---|
3988.62 | 8 | Sell 4 |
3988.61 | 32 | Sell 3 |
3988.60 | 47 | Sell 2 |
3988.59 | 3 | Sell 1 |
3988.51 | 56 | Buy 1 |
3988.50 | 15 | Buy 2 |
3988.49 | 100 | Buy 3 |
3988.48 | 10 | Buy 4 |
"data": {
"sequence": 17,
"change": "3988.50,buy,44" //Price, side, quantity
}
"data": {
"sequence": 18,
"change": "3988.61,sell,0" //Price, side, quantity
}
1.
2.
Price | Size | Side |
---|---|---|
3988.62 | 8 | Sell 3 |
3988.60 | 47 | Sell 2 |
3988.59 | 3 | Sell 1 |
3988.51 | 56 | Buy 1 |
3988.50 | 44 | Buy 2 |
3988.49 | 100 | Buy 3 |
3988.48 | 10 | Buy 4 |
Request
Query Params
token
string
required
Example:
2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ_cpz4VOPFmQFib6P8hYnrVkopegzA-XTtiYB9J6i9GjsxUuhPw3Blq6rhZlGykT3Vp1phUafnulOOpts-MEmEE_W_XygA1q6ypUyk3f_-aZJBvJHl5Vs9Y=.rIAVDSL657g7mnAiHkH5aA==
connectId
string
optional
Example:
121345
Modified at 5 months ago