Skip to main content

Orders (Level 3)

CHANNEL

wss://ws-auth.kraken.com/v2

level3Authentication Required

Summary

The level3 channel has an additional level of granularity over the book channel, it provides visibility of individual orders in the book.

L3 shows orders resting in the visible order book and it will never be crossed (i.e. no overlapping buy and sell orders). This feed excludes:

  • In-flight orders.
  • Unmatched market orders.
  • Untriggered stop-loss and take-profit orders.
  • Hidden quantity of iceberg orders.

For more detail on maintaining the order book and generating a checksum, see guide.

Subscription limits

The level3 channel is authenticated (i.e. it requires an API token to subscribe) and there are restrictions of the number of symbols and the subscription rate.

  • The total number of symbols per websocket connection is 200. A client can open multiple websockets connections to increase symbol coverage.
  • The subscription rate determined by client tier and order book depth. Standard rate count limit per second is 200 and the pro limit is 500.
  • The counter increase per book depth subscription is given in the table below.
Order Book DepthRate Counter Increase per Symbol
105
10025
1000100

Example: Pro client can subscribe to 100 symbols of 10 depth every second.

Subscribe Request

Only one subscription to one depth level per symbol is supported, i.e. cannot subscribe to 10 levels and 1000 levels of "BTC/USD".

MESSAGE BODY

method string required
Value: subscribe
params object
channel string required
Value: level3
symbol array of strings required
Example: ["BTC/USD", "MATIC/GBP"]
A list of currency pairs.
depth integer
Possible values: [10, 100, 1000]
Default value: 10
The number of price levels to be received.
snapshot boolean
Possible values: [true, false]
Default value: true
Request a snapshot after subscribing.
token string required
This is a authenticated channel, a session token is required. See guides on how to generate a token via REST.
req_id integer
Optional client originated request identifier sent as acknowledgment in the response.

Snapshot Response

MESSAGE BODY

channel string
Value: level3
type string
Value: snapshot
data array [
[0] book object
The book element is always the first and only item in the data payload.
symbol string
Example: "BTC/USD"
The symbol of the currency pair.
bids array [
A list of buy orders posted in the book.
[many] order object
order_id string
The Kraken order identifier of the order in the book
limit_price float
Limit price of the order
order_qty float
The remaining order quantity visible in the book
timestamp string
Format: RFC3339
Example: 2022-12-25T09:30:59.123456Z
The time the order was inserted or amended.
]
asks array [
A list of sell orders posted in the book.
[many] order object
order_id string
The Kraken order identifier of the order in the book
limit_price float
Limit price of the order
order_qty float
The remaining order quantity visible in the book
timestamp string
Format: RFC3339
Example: 2022-12-25T09:30:59.123456Z
The time the order was inserted or amended.
]
checksum integer
CRC32 checksum for the top 10 price levels on both sides.
]

Update Response

  • The updates will be streamed following the initial snapshot, no sequencing is required.
  • The L3 channel is not throttled, updates will be provided in the real-time.
  • If a price level is removed from the subscribed levels (i.e. result of trades/cancels) then all orders in the next available level will generate an add event.

Maintaining the book

After each update, the book should be truncated to your subscribed depth, there will be no delete event for price levels that fall out of scope. In other words, if you are subscribed with depth of 10 and an insert into the book results in 11 bids, you must remove the 11th worst bid.

MESSAGE BODY

channel string
Value: level3
type string
Value: update
data array [
[0] book object
The book element is always the first and only item in the data payload.
checksum integer
CRC32 checksum for the top 10 price levels on both sides.
symbol string
Example: "BTC/USD"
The symbol of the currency pair.
bids array [
A list of order events to the bid side of book.
[many] order_event object
event string
Possible values: [add, modify, delete]
    The type of order event for this update:
  • add: A new order added to the book.
  • modify: The order quantity has been modified, i.e. a fill.
  • delete: The order has been removed from the book, i.e. full fill or cancel.
order_id string
The Kraken order identifier of the order in the book
limit_price float
Limit price of the order
order_qty float
The remaining order quantity visible in the book
timestamp string
Format: RFC3339
Example: 2022-12-25T09:30:59.123456Z
The time the order was inserted or amended.
]
asks array [
A list of order events to the ask side of book.
[many] order_event object
event string
Possible values: [add, modify, delete]
    The type of order event for this update:
  • add: A new order added to the book.
  • modify: The order quantity has been modified, i.e. a fill.
  • delete: The order has been removed from the book, i.e. full fill or cancel.
order_id string
The Kraken order identifier of the order in the book
limit_price float
Limit price of the order
order_qty float
The remaining order quantity visible in the book
timestamp string
Format: RFC3339
Example: 2022-12-25T09:30:59.123456Z
The time the order was inserted or amended.
]
]

Unsubscribe Request

MESSAGE BODY

method string required
Value: unsubscribe
params object
channel string required
Value: level3
symbol array of strings required
Example: ["BTC/USD", "MATIC/GBP"]
A list of currency pairs.
depth integer
Possible values: [10, 100, 1000]
Default value: 10
The number of price levels to be received.
token string required
This is a authenticated channel, a session token is required. See guides on how to generate a token via REST.
req_id integer
Optional client originated request identifier sent as acknowledgment in the response.