Introduction
1. Introduction
TIP
2. Apply Connect Token
Get Public Token - Spot/Margin
Get Private Token - Spot/Margin
Get Public Token - Futures
Get Private Token - Futures
3. Create connection
TIP
{
"id": "hQvf8jkno",
"type": "welcome"
}
4. Ping
{
"id": "1545910590801",
"type": "ping"
}
{
"id": "1545910590801",
"type": "pong"
}
5. Subscribe
Parameters
//Spot Demo
{
"id": 1545910660739, //The ID should be a unique value
"type": "subscribe",
"topic": "/market/ticker:BTC-USDT,ETH-USDT", //Topic needs to be subscribed. Some topics support subscribing to information on multiple trading pairs by separating them with a comma (“,”).
"privateChannel": false, //Adopted the private channel or not. Set as false by default.
"response": true //Whether the server needs to return the receipt information of this subscription or not. Set as false by default.
}
//Future Demo
{
"id": 1545910660739, //The ID should be a unique value
"type": "subscribe",
"topic": "/market/ticker:XBTUSDM", //Subscribed topic. Some topics support subscribing to information on multiple trading pairs by separating them with a comma (“,”).
"privateChannel": false, //Adopted the private channel or not. Set as false by default.
"response": true //Whether the server needs to return the receipt information of this subscription or not. Set as false by default.
}
{
"id": "1545910660739",
"type": "ack"
}
6. UnSubscribe
Parameters
//Spot Unsubscribe Topic
{
"id": "1545910840805", //The ID should be a unique value
"type": "unsubscribe",
"topic": "/market/ticker:BTC-USDT,ETH-USDT", //Topic needs to be unsubscribed. Some topics support unsubscribing from information on multiple trading pairs by separating them with a comma (“,”).
"privateChannel": false,
"response": true //Whether the server needs to return the receipt information of this subscription or not. Set as false by default.
}
//Futures Unsubscribe Topic
{
"id": "1545910840805", //The id should be an unique value
"type": "unsubscribe",
"topic": "/market/ticker:XBTUSDM", //Topic needs to be unsubscribed. Some topics support unsubscribing from information on multiple trading pairs by separating them with a comma (“,”).
"privateChannel": false,
"response": true //Whether the server needs to return the receipt information of this subscription or not. Set as false by default.
}
{
"id": "1545910840805",
"type": "ack"
}
Modified at 2 months ago