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

Symbol definition

Request Example

Copy

{
    "cmd_id":14000,
    "seq_id":123,
    "ext":"3baaa938-f92c-4a74-a228-fd49d5e2f8bc-1678419657806",
    "data":{
        "symbol_list": [
            {
                "symbol_id": 112312,
                "trade_type": 1,
                "trade_mode": 1,
            }
        ],
    }
}

Response-Protocol Number: 14001

Data format:json

Data Structure

data definition

Tick ​​definition

tick_deep definition

Example Response

Copy

{
    "ret":200,
    "msg":"ok",
    "cmd_id":14001,
    "seq_id":123,
    "ext":"3baaa938-f92c-4a74-a228-fd49d5e2f8bc-1678419657806",
    "data":{
        "tick_list":[
            {
                "symbol_id": 123,
                "trade_type": 1,
                "trade_mode": 0,
                "seq": 1605509068000001,
                "tick_time": 1605509068,
                "price_digits": 2,
                "price": "651.12",
                "tick_deep": [
                    {
                        "price_bid": "9.12",
                        "price_ask": "147.12",
                        "volume_bid": "9.12",
                        "volume_ask": "147.12",
                    },
                ],
                "open_price": "651.12",
                "close_price": "623.12",
                "high_price": "674.12",
                "low_price": "619.12",
                "yesterday_close_price": "623.12",
            },
        ]
    }    
}

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