Orderbook - Increment
wss://ws-api-spot.kucoin.com
Topic:/market/level2:{symbol},{symbol}
Description
Subscribe Message
{
"id": 1545910660739,
"type": "subscribe",
"topic": "/market/level2:BTC-USDT",
"response": true
}
Response
Data Schemamilliseconds
orderbookIncrement
topic
string
required
type
string
required
subject
string
required
data
object
required
changes
object
required
sequenceEnd
integer <int64>
required
sequenceStart
integer <int64>
required
symbol
string
required
time
integer <int64>
required
Example
{
"topic": "/market/level2:BTC-USDT",
"type": "message",
"subject": "trade.l2update",
"data": {
"changes": {
"asks": [
[
"67993.3", //price
"1.21427407", //size
"14701689783" //sequence
]
],
"bids": []
},
"sequenceEnd": 14701689783,
"sequenceStart": 14701689783,
"symbol": "BTC-USDT",
"time": 1729816425625 //milliseconds
}
}
1.
2.
3.
4.
5.
"asks":[
["3988.59","3", "16"], // ignore it because sequence = 16
["3988.61","0", "19"], // Remove 3988.61
["3988.62","8", "15"], // ignore it because sequence < 16
]
"bids":[
["3988.50", "44", "18"] // Update size of 3988.50 to 44
]
"sequenceStart": 19,
"sequenceEnd": 15,
...
Tips
"sequence": "16",
"asks":[
["3988.62","8"],//[Price, Size]
["3988.61","32"],
["3988.60","47"],
["3988.59","3"],
]
"bids":[
["3988.51","56"],
["3988.50","15"],
["3988.49","100"],
["3988.48","10"]
]
...
Price | Size | Side |
---|---|---|
3988.62 | 8 | Sell |
3988.61 | 32 | Sell |
3988.60 | 47 | Sell |
3988.59 | 3 | Sell |
3988.51 | 56 | Buy |
3988.50 | 15 | Buy |
3988.49 | 100 | Buy |
3988.48 | 10 | Buy |
Price | Size | Side |
---|---|---|
3988.62 | 8 | Sell |
3988.60 | 47 | Sell |
3988.59 | 3 | Sell |
3988.51 | 56 | Buy |
3988.50 | 44 | Buy |
3988.49 | 100 | Buy |
3988.48 | 10 | Buy |
Request
Query Params
token
string
required
Example:
2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ2gZJLp3fgqGGvpzdfennGL3R06_0gIS-diYB9J6i9GjsxUuhPw3Blq6rhZlGykT3Vp1phUafnulOOpts-MEmEF-3bpfetLOAjzQ04YZ_8fRJBvJHl5Vs9Y=.28mIdGU0xg5pJ6TpPYIhjg==
connectId
string
optional
Example:
121345
Modified at 2024-12-02 07:49:11