The order book channel provides real-time updates on orders.

📘

You will receive an initial order book snapshot during subscription.

// subscribe request
{
    "command": "subscribe",
    "identifier": "{\"channel\":\"OrderbookChannel\",\"market\":\"IOT-BTC\"}"
}

// confirmation
{
    "type": "confirm_subscription",
    "identifier": "{\"channel\":\"OrderbookChannel\",\"market\":\"IOT-BTC\"}"
}

// initial snapshot
{
    "identifier": "{\"channel\":\"OrderbookChannel\",\"market\":\"ETH-BTC\"}",
    "message": {
        "init": {
            "bids": [
                {"price": "0.075", "size": "1.56307"},
                {"price": "0.07491", "size": "0.011"},
                {"price": "0.0747", "size": "1.0"},
                ...
            ],
            "asks": [
                {"price": "0.08975", "size": "0.98998"},
                {"price": "0.0899", "size": "0.5"},
                {"price": "0.0913", "size": "0.19231"},
                ...
            ],
            "price_precision": 5,
            "size_precision": 5
        }
    }
}

// response structure
// asks
{
    "identifier": "{\"channel\":\"OrderbookChannel\",\"market\":\"IOT-BTC\"}",
    "message": {
        "update": {
            "key": "asks",
            "value": [
                {
                    "price": "0.00022168",
                    "size": "447.66944"
                }
            ]
        }
    }
}

// bids
{
    "identifier": "{\"channel\":\"OrderbookChannel\",\"market\":\"IOT-BTC\"}",
    "message": {
        "update": {
            "key": "bids",
            "value": [
                {
                    "price": "0.00022168",
                    "size": 0.0
                }
            ]
        }
    }
}