Skip to main content
{
    "method": "subscribe",
    "params": {
        "channel": "book",
        "symbol": [
            "ALGO/USD",
            "MATIC/USD"
        ]
    }
}
{
    "channel": "book",
    "type": "snapshot",
    "data": [
        {
            "symbol": "MATIC/USD",
            "bids": [
                {
                    "price": 0.5666,
                    "qty": 4831.75496356
                },
                {
                    "price": 0.5665,
                    "qty": 6658.22734739
                },
                {
                    "price": 0.5664,
                    "qty": 18724.91513344
                },
                {
                    "price": 0.5663,
                    "qty": 11563.92544914
                },
                {
                    "price": 0.5662,
                    "qty": 14006.65365711
                },
                {
                    "price": 0.5661,
                    "qty": 17454.85679807
                },
                {
                    "price": 0.566,
                    "qty": 18097.1547
                },
                {
                    "price": 0.5659,
                    "qty": 33644.89175666
                },
                {
                    "price": 0.5658,
                    "qty": 148.3464
                },
                {
                    "price": 0.5657,
                    "qty": 606.70854372
                }
            ],
            "asks": [
                {
                    "price": 0.5668,
                    "qty": 4410.79769741
                },
                {
                    "price": 0.5669,
                    "qty": 4655.40412487
                },
                {
                    "price": 0.567,
                    "qty": 49844.89424998
                },
                {
                    "price": 0.5671,
                    "qty": 24306.41678
                },
                {
                    "price": 0.5672,
                    "qty": 29783.25223475
                },
                {
                    "price": 0.5673,
                    "qty": 57234.71239278
                },
                {
                    "price": 0.5674,
                    "qty": 45065.04744
                },
                {
                    "price": 0.5675,
                    "qty": 5912.76380354
                },
                {
                    "price": 0.5676,
                    "qty": 42514.92434778
                },
                {
                    "price": 0.5677,
                    "qty": 36304.0847022
                }
            ],
            "checksum": 2439117997,
            "timestamp": "2023-10-06T17:35:55.440295Z"
        }
    ]
}
{
    "method": "unsubscribe",
    "params": {
        "channel": "book",
        "symbol": [
            "ALGO/USD",
            "MATIC/USD"
        ]
    }
}

Documentation Index

Fetch the complete documentation index at: https://kraken-sandbox.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

WSSws.kraken.com/v2book
The book channel streams level 2 (L2) order book. It describes the individual price levels in the book with aggregated order quantities at each level. Subscriptions to this channel can be made for multiple symbols at once by specifying a list of pairs in the symbol. For more detail on maintaining the order book and generating a checksum, see guide.

Subscribe

method
string
required
Value: subscribe
params
object
required
req_id
integer
Optional client originated request identifier sent as acknowledgment in the response.

Snapshot

The returned snapshot data contains the specified number of bids and asks for the symbol including a CRC32 checksum of the top 10 bids and asks.
channel
string
Value: book
type
string
One of: snapshot
data
object[]

Update

The data contains the updates of the bids and asks for the relevant symbol including a CRC32 checksum of the top 10 bids and asks. Note, it is possible to have multiple updates to the same price level in a single update message. Updates should always be processed in sequence.
channel
string
Value: book
type
string
One of: update
data
object[]

Unsubscribe

method
string
required
Value: unsubscribe
params
object
required
req_id
integer
Optional client originated request identifier sent as acknowledgment in the response.