The Pro API is currently under active development and has not been officially released yet.In its current phase (Phase 1), only Spot and Furures are supported. Leveraged trading (Margin)and Options are not yet available. We plan to gradually add support for them throughout 2026.Please DO NOT use this API in production environments or live trading under any circumstances. The endpoint URLs, parameters, response structures, and overall behavior are subject to change without prior notice.
1. Introduction#
While there is a strict access frequency control for REST API, we highly recommend that API users utilize Websocket to get the real-time data.The recommended way is to just create a Websocket connection and subscribe to multiple channels.
2. Apply Connect Token#
Before creating a Websocket connection, you need to get the websocket base URL and apply for a Token。The token is valid for only 24 hours, and a single connection is expected to be disconnected after 24 hours.
if you subscribe to public data, you don't need to obtain tokens
3. Create connection#
For push of public market data, no token is needed
Once the connection has been successfully established, the system will send a welcome message.The connection will only be available once the welcome message has been received. There's a recommanded interval in ms for ping message that should be send to server for keepalive.
{"sessionId":"7245afa1-a57c-4f90-b4bd-90126387214b","message":"welcome","pingInterval":30000}
sessionId: The sessionId is a unique ID that is to identify a connection, which is useful for troubleshooting for kucoin developing team.
pingInterval: The recommended interval in ms for the client to send ping message to server to keep alive the connection4. Ping#
{
"id": "1545910590801",
"type": "ping"
}
To prevent the TCP link being disconnected from the server, the client side needs to send ping messages every pingInterval time to the server to keep the link alive.After the ping message is sent to the server, the system will return a pong message to the client side.If the server has not received any message from the client for a long time, the connection will be disconnected by the server. Also if client cannot receive pong message from server for a while (such as 3 second) the connection should be cansidered as broken and a new connection is recommended to be initialized.{
"id": "1545910590801",
"type": "pong",
"ts": 1764577015970496582
}
5. Subscribe#
To receive market push or private push from server, the client side should send a subscription message to the server.Parameters#
id: ID is a unique string to mark the request which is same as id when server acks this request.
channel: The topic you want to subscribe to.
symbol: The the symbol name for this channel.
tradeType: SPOT or FUTURES
{
"id": "1545910660739",
"action": "subscribe",
"channel": "ticker",
"symbol": "BTC-USDT",
"tradeType": "SPOT"
}
{
"id": "1545910660739",
"action": "subscribe",
"channel": "trade",
"symbol": "ETHUSDTM",
"tradeType": "FUTURES"
}
If the subscription succeeds, the system will send ack messages to you, when the response is set as true.{
"id": "1545910660739",
"result": "true"
}
Whenever topic messages are generated, the system will send the corresponding messages to the client side. For details about the message format, please check the definitions of topics.6. UnSubscribe#
Unsubscribe from channels you have subscribed to.Parameters#
id: ID is a unique string to mark the request which is same as id when server acks this request.
channel: The topic you want to subscribe to.
symbol: The the symbol name for this channel.
tradeType: SPOT or FUTURES
{
"id": "1545910840805",
"action": "unsubscribe",
"channel": "ticker",
"symbol": "BTC-USDT",
"tradeType": "SPOT"
}
{
"id": "1545910840805",
"action": "unsubscribe",
"channel": "trade",
"symbol": "ETHUSDTM",
"tradeType": "FUTURES"
}
If the unsubscription succeeds, the system will send ack messages to you, when the response is set as true.{
"id": "1545910840805",
"result": "true"
}