Ticker
Interface Description
The interface feature is that for each websocket connection, each time the request is sent, the backend will overwrite the previous subscription request by default. After the subscription is successful, data will be pushed.
Request-Protocol Number: 14000
Data format:json
Data Structure
data definition
Fields | name | type | Required fields | illustrate |
symbol_list | Product List | array | yes | See the symbol definition below for the specific format |
Symbol definition
Fields | name | type | Required fields | illustrate |
symbol_id | Product ID | uint64 | yes | |
trade_type | Transaction Type | uint32 | yes | 1: Full position contract, 2: Isolated position contract, 3: Leverage, 5: Spot, 6: Stock |
trade_mode | Trading Model | uint32 | yes | 1:MM, 2:ButterflyMM, 3:Matchmaking, 4:Aggregation |
Request Example
Copy
Response-Protocol Number: 14001
Data format:json
Data Structure
data definition
Fields | name | type | illustrate |
tick_list | tick snapshot data | array | See the tick definition below for the specific format |
Tick definition
Fields | name | type | illustrate |
symbol_id | Product ID | uint64 | |
trade_type | Transaction Type | uint32 | 1: Full position contract, 2: Isolated position contract, 3: Leverage, 5: Spot, 6: Stock |
trade_mode | Trading Model | uint32 | 1:MM, 2:ButterflyMM, 3:Matchmaking, 4:Aggregation |
seq | Quotation number | uint64 | |
tick_time | Quote timestamp | uint64 | |
price_digits | Price decimal places | uint32 | |
price | Latest transaction price | string | |
tick_deep | Depth Quote | array | This depth will only bring one level of quote information, see the tick_deep definition below |
open_price | The opening price of the latest day | string | |
close_price | The closing price of the latest day | string | |
high_price | The highest price of K in the last day | string | |
low_price | The lowest price of K in the last day | string | |
yesterday_close_price | The most recent day's daily K closing price yesterday | string |
tick_deep definition
Fields | name | type | illustrate |
price_bid | Buy price, buy price | string | |
price_ask | Selling price, selling price | string | |
volume_bid | Buy one volume, buy volume | string | |
volume_ask | Selling volume, selling volume | string |
Example Response
Copy
Push data
illustrate
This quote push mainly includes transaction and one-level depth quotes. It is a comprehensive quote push. The data content is a string. Currently, one quote is pushed at a time. The backend service will push the data to the requester who sends a real-time quote subscription request.
Field Explanation
p(product ID, quote transaction type, transaction mode, quote sequence number, quote timestamp, current price, first tier bid price, first tier ask price, first tier bid volume, first tier ask volume); “p(symbol_id,trade_type,trade_mode,seq,tick_time,price,price_bid1,price_ask1,volume_bid1,volume_ask1);” trade_type value meaning 1: full position contract, 2: single position contract, 3: leverage, 5: spot, 6: stock trade_mode value meaning 1: MM, 2: butterfly MM, 3: matching, 4: aggregation
Push data example
p(1123,1,0,1232312,34545435345,6.23,6.23,6.24,123,234);
Last updated