Best Bid/Ask

Channel Update Frequency: Real-time

This websocket subscription streams the best bid and ask in real-time. Messages are pushed on every best bid/ask update in real-time

Curl

Request format

{
    "op": "subscribe",
    "tag": "test1",
    "args": [
        "bestBidAsk:BTC-USD-SWAP-LIN"
    ]
}

Success response format

{
    "success": true,
    "tag": "test1",
    "event": "subscribe",
    "channel": "bestBidAsk:BTC-USD-SWAP-LIN",
    "timestamp": "1665456882918"
}

** depth update channel format**

{
    "table": "bestBidAsk",
    "data": {
        "ask": [
            19045.0,
            1.0
        ],
        "checksum": 3790706311,
        "marketCode": "BTC-USD-SWAP-LIN",
        "bid": [
            19015.0,
            1.0
        ],
        "timestamp": "1665456882928"
    }
}

Request Parameters

Parameters
Type
Required
Description

op

STRING

Yes

subscribe

tag

INTEGER or STRING

No

If given it will be echoed in the reply

args

LIST

Yes

List of individual markets <bestBidAsk>:<marketCode> e.g: ["bestBidAsk:BTC-USD-SWAP-LIN"]

Channel Update Fields

Fields
Type
Description

table

STRING

bestBidAsk

data

DICTIONARY

ask

LIST of floats

Sell side depth;

  1. price

  2. quantity

bid

LIST of floats

Buy side depth;

  1. price

  2. quantity

checksum

LONG

marketCode

STRING

marketCode

timestamp

STRING

Millisecond timestamp

Last updated