Public WebSocket
Mainnet
Contracts: wss://stream.deepcoin.com/streamlet/trade/public/swap?platform=api
Spot: wss://stream.deepcoin.com/streamlet/trade/public/spot?platform=api
Request parameters for version 2: ?platform=api&version=v2
Access Method
# Send Heartbeat
request:
ping
response:
pong
Request Parameters
Subscribe Parameters
| parameter | required | type | description | remark |
|---|---|---|---|---|
| Action | yes | string | Subscription operation | 0:Unsubscribe all;1:Subscribe;2:Unsubscribe; |
| FilterValue | yes | string | Filter value | Format:$ExchangeID_$InstrumentID_$Period Period range[1m:1 minute;5m:5 minutes;15m:15 minutes;30m:30 minutes;1h:1 hour;4h:4 hours;12h:12 hours;1d:1 day;1w:1 week;1o:1 month;1y:1 year;] Spot uses BASE/QUOTE (e.g. DeepCoin_BTC/USDT), contracts do not use a slash (e.g. DeepCoin_BTCUSDT). |
| LocalNo | yes | int | Local unique identifier | Greater than 0, string comparison, customized, cannot be repeated in one session |
| ResumeNo | yes | int | Resume number | 0:Start from the beginning;-1:Resume from the latest position on the server; |
| TopicID | yes | string | Subscription topic ID | 2:Transaction details |
v2
| parameter | required | type | description | remark |
|---|---|---|---|---|
| Action | yes | string | Subscription operation | 0:Unsubscribe all;1:Subscribe;2:Unsubscribe; |
| Symbol | yes | string | Filter value | Format: $InstrumentID_$Period Period Period range[1m:1 分钟;5m:5 分钟;15m:15 分钟;30m:30 分钟;1h:1 小时;4h:4 小时;12h:12 小时;1d:一天;1w:一个星期;1o:一个月;1y:一年;] Spot uses BASE/QUOTE(e.g. BTC/USDT), contracts do not use a slash (e.g. BTCUSDT)。 |
| LocalNo | yes | int | Local unique identifier | Greater than 0, string comparison, customized, cannot be repeated in one session |
| ResumeNo | yes | int | Resume number | 0:Start from the beginning;-1:Resume from the latest position on the server; |
| Topic | yes | string | Subscription topic ID | market-latest tick;trade-recently;kline-k line;book25-25Level Incremental Market Data;liquidationOrder-Liquidation Order |