KUCOIN API - EU
SDK
Telegram
Kucoin
  1. Public Channels
  • Introduction
  • Authentication
  • Enums Definitions
  • Terms Definitions
  • SDK
  • Rate Limit
  • Classic REST
    • Account Info
      • Account & Funding
        • Get Account Summary Info
        • Get KYC Regions
        • Get Apikey Info
        • Get Account Type - Spot
        • Get Account List - Spot
        • Get Account Detail - Spot
        • Get Account - Cross Margin
        • Get Account - Isolated Margin
        • Get Account Ledgers - Spot/Margin
        • Get Account Ledgers - Trade_hf
        • Get Account Ledgers - Margin_hf
      • Sub Account
        • Add sub-account
        • Add sub-account Margin Permission
        • Get sub-account List - Summary Info
        • Get sub-account Detail - Balance
        • Get sub-account List - Spot Balance (V2)
      • Sub Account API
        • Get sub-account API List
        • Add sub-account API
        • Modify sub-account API
        • Delete sub-account API
      • Deposit
        • Add Deposit Address (V3)
        • Get Deposit Address (V3)
        • Get Deposit History
      • Withdrawals
        • Get Withdrawal Quotas
        • Withdraw (V4)
        • Cancel Withdrawal
        • Get Withdrawal History
        • Get Withdrawal History By ID
      • Transfer
        • Get Transfer Quotas
        • Flex Transfer
      • Trade Fee
        • Get Basic Fee - Spot/Margin
        • Get Actual Fee - Spot/Margin
    • Spot Trading
      • Market Data
        • Get Announcements
        • Get Currency
        • Get All Currencies
        • Get Symbol
        • Get All Symbols
        • Get Ticker
        • Get All Tickers
        • Get Trade History
        • Get Klines
        • Get Part OrderBook
        • Get Full OrderBook
        • Get Call Auction Part OrderBook
        • Get Call Auction Info
        • Get Fiat Price
        • Get 24hr Stats
        • Get Market List
        • Get Client IP Address
        • Get Server Time
        • Get Service Status
      • Orders
        • Add Order
        • Add Order Sync
        • Add Order Test
        • Batch Add Orders
        • Batch Add Orders Sync
        • Cancel Order By OrderId
        • Cancel Order By OrderId Sync
        • Cancel Order By ClientOid
        • Cancel Order By ClientOid Sync
        • Cancel Partial Order
        • Cancel All Orders By Symbol
        • Cancel All Orders
        • Modify Order
        • Get Order By OrderId
        • Get Order By ClientOid
        • Get Symbols With Open Order
        • Get Open Orders
        • Get Open Orders By Page
        • Get Closed Orders
        • Get Trade History
        • Get DCP
        • Set DCP
        • Add Stop Order
        • Cancel Stop Order By ClientOid
        • Cancel Stop Order By OrderId
        • Batch Cancel Stop Orders
        • Get Stop Orders List
        • Get Stop Order By OrderId
        • Get Stop Order By ClientOid
        • Add OCO Order
        • Cancel OCO Order By OrderId
        • Cancel OCO Order By ClientOid
        • Batch Cancel OCO Order
        • Get OCO Order By OrderId
        • Get OCO Order By ClientOid
        • Get OCO Order Detail By OrderId
        • Get OCO Order List
    • Margin Trading
      • Market Data
        • Get Symbols - Cross Margin
        • Get Symbols - Isolated Margin
        • Get Mark Price Detail
        • Get Margin Config
        • Get Mark Price List
        • Get Margin Collateral Ratio
        • Get Market Available Inventory
      • Orders
        • Add Order
        • Add Order Test
        • Cancel Order By OrderId
        • Cancel Order By ClientOid
        • Cancel All Orders By Symbol
        • Get Symbols With Open Order
        • Get Open Orders
        • Get Closed Orders
        • Get Trade History
        • Get Order By OrderId
        • Get Order By ClientOid
      • Debit
        • Borrow
        • Get Borrow History
        • Repay
        • Get Repay History
        • Get Interest History
        • Modify Leverage
      • Risk Limit
        • Get Margin Risk Limit
    • Earn
      • Simple Earn
        • Purchase
        • Get Redeem Preview
        • Redeem
        • Get Savings Products
        • Get Promotion Products
        • Get Account Holding
    • Broker
      • Introduction
      • Broker Application
      • Instructions
      • Broker Pro
        • Introduction
        • Broker Fast API Service
        • Get Broker Rebate
        • Get Commission
        • Get User List
        • Get User Transactions
  • Classic Websocket
    • Base Info
      • Introduction
      • Get Public Token - Classic Spot/Margin
      • Get Private Token - Classic Spot/Margin
    • Spot Trading
      • Public Channels
        • Ticker
        • All Tickers
        • Orderbook - Level 1
        • Orderbook - Level 5
        • Orderbook - Level 50
        • Orderbook - Increment
        • Call Auction Orderbook - Level 50
        • Call Auction Data
        • Klines
        • Trade
        • Symbol Snapshot
        • Market Snapshot
      • Private Channels
        • Order V2
        • Order V1
        • Balance
        • Stop Order
    • Margin Trading
      • Public Channels
        • Index Price
        • Mark Price
      • Private Channels
        • Cross Margin Position
        • Isolated Margin Position
  • Error Code
    • HTTP
    • Spot
    • Margin
    • Earn
    • Websocket
  • Abandoned Endpoints
    • Introduction
    • Account & Funding
      • Get sub-account List - Summary Info (V1)
      • Get sub-account List - Spot Balance (V1)
      • Get Deposit Addresses (V2)
      • Get Deposit Addresses - V1
      • Get Deposit History - Old
      • Get Withdrawal History - Old
      • Add Deposit Address - V1
      • Withdraw - V1
    • Spot Trading
      • Orders
        • Add Order - Old
        • Add Order Test - Old
        • Batch Add Orders - Old
        • Cancel Order By OrderId - Old
        • Cancel Order By ClientOid - Old
        • Batch Cancel Order - Old
        • Get Orders List - Old
        • Get Recent Orders List - Old
        • Get Order By OrderId - Old
        • Get Order By ClientOid - Old
        • Get Trade History - Old
        • Get Recent Trade History - Old
    • Margin Trading
      • Get Account Detail - Margin
      • Add Order - V1
      • Add Order Test - V1
      • Get Account List - Isolated Margin - V1
      • Get Account Detail - Isolated Margin - V1
  • Developing
    • Introduction
  1. Public Channels

Orderbook - Increment

wss://ws-api-spot.kucoin.eu

Topic:/market/level2:{symbol},{symbol}#

Description
The system will return the increment change orderbook data(All depth)
A topic supports up to 100 symbols.
If there is no change in the market, data will not be pushed
Push frequency: real-time

Subscribe Message#

{
  "id": 1545910660739,
  "type": "subscribe",
  "topic": "/market/level2:BTC-USDT",
  "response": true
}

Response#

Data Schema
orderbookIncrement

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
    }
}
Calibration procedure:
1.
After receiving the websocket Level 2 data flow, cache the data.
2.
Initiate a Level 2 request to Get Full OrderBook
3.
Playback the cached Level 2 data flow.
4.
Apply the new Level 2 data flow to the local snapshot to ensure that sequenceStart(new) < = sequenceEnd+1(old) and sequenceEnd(new) > sequenceEnd(old). The sequence on each record in changes only represents the last modification of the corresponding sequence of the price, and does not serve as a basis for judging message continuity.
5.
Update the level2 full data based on sequence according to the price and size. If the price is 0, ignore the messages and update the sequence. If the size=0, update the sequence and remove the price of which the size is 0 out of level 2. For other cases, please update the price.
The Change attribute of Level 2 is a string value of "price, size, sequence", namely: ["price", "quantity", "sequence"].
Please note: size refers to the latest size corresponding to price. When the size is 0, the corresponding price needs to be deleted from the order book.
Example
Take BTC/USDT as an example, suppose the current order book data in level 2 is as follows:
After subscribing to the channel, you would receive changes as follows:
...
"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
The sequence on each record in changes only represents the last modification of the corresponding sequence of the price, not as a basis for judging the continuity of the message; for example, when there are multiple updates at the same price ["3988.50", "20", "17" "], ["3988.50", "44", "18"], at this time only the latest ["3988.50", "44", "18"] will be pushed
Get a snapshot of the order book through a REST request (Level 2) to build a local order book. Suppose that data we got is as follows:
...
"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"]
]
...
The current data on the local order book is as follows:
PriceSizeSide
3988.628Sell
3988.6132Sell
3988.6047Sell
3988.593Sell
3988.5156Buy
3988.5015Buy
3988.49100Buy
3988.4810Buy
In the beginning, the sequence of the order book is 16. Discard the feed data of sequence that is below or equals to 16, and apply playback the sequence [18,19] to update the snapshot of the order book. Now the sequence of your order book is 19 and your local order book is up-to-date.
Diff:
Update size of 3988.50 to 44 (Sequence 18)
Remove 3988.61 (Sequence 19)
Now your current order book is up-to-date and final data is as follows:
PriceSizeSide
3988.628Sell
3988.6047Sell
3988.593Sell
3988.5156Buy
3988.5044Buy
3988.49100Buy
3988.4810Buy

Request

Query Params

Modified at 2025-09-26 10:04:30
Previous
Orderbook - Level 50
Next
Call Auction Orderbook - Level 50