Order entry — FIX
Order entry uses FIX 4.4. A trading session authenticates on Logon with your FIX API key, an HMAC-SHA512 password signature and a nonce, then sendsNewOrderSingle, OrderCancelRequest, OrderCancelReplaceRequest, OrderMassCancelRequest and OrderStatusRequest. Kraken answers with ExecutionReport, and with OrderCancelReject, Reject or BusinessMessageReject when a request cannot be processed.
- Market and limit orders, with GTC, IOC and FOK time in force
- A mass cancel carries
AllAccounts (5034):Yreaches every account,NwithAccount (1)cancels one account’s orders only - Price must be a multiple of the instrument’s
tickSizeand quantity a whole number of Min Tradable Contracts (each a fraction of a contract) and not below the minimum order quantity: an order that breaks any of these is rejected with a session Reject (35=3) - A refused amend leaves the order resting; no Execution Report is sent for it. A
35=jfor an amend that timed out does not mean it was refused: check the order withOrderStatusRequest - Cancel-on-disconnect is on by default
- Sequence numbers reset at the daily 22:00 UTC session rollover
Market data — SBE
Public market data is published in Simple Binary Encoding, a fixed-layout binary format designed for low-latency decoding. A session schema handles negotiation, authentication, subscriptions and keepalive; a market data schema carries the data itself.- Subscribe to incremental updates on the live connection and buffer them first, then request a snapshot on the snapshot connection and apply the buffered updates that follow it. Requesting the snapshot first can miss updates published in between
- Feeds: instrument definitions, L3 order book, trades, instrument status and instrument summaries (reference price). US Perps provides trading status per instrument; the trading session status feed applies to Spot and Futures only
- Contiguous sequence numbers on every incremental feed, so gaps can be detected. Book, instrument, summary and trading-session gaps are recovered from a snapshot; there is no trade snapshot, so missed trades are not recovered
Drop copy — FIX
The drop copy is a separate FIX 4.4 session that delivers a copy of every Execution Report on your account. Business messages flow one way, from Kraken to you. The Execution Report has the fields of the order-entry Execution Report, in the same order and with the same values, and the sameExecID (17) on the same report, so you can match the two feeds (one Execution Report has no match: the New of an order that order entry holds without its instrument id). It differs in a few documented ways:
- It adds
TradeDate (75),ClearingFirm (439)andAccountType (581) ClOrdID (11)is the order’s first ClOrdID on every report, andOrigClOrdID (41)is not sent- Order status answers (
ExecType (150)=I) are not sent DisplayQty (1138)is not sent; order entry echoes it on an order sent with one- No report is sent for an amend the exchange refuses on a live order, or for a cancel or amend that names no live order
Instrument reference data — REST
The Instrument Definitions endpoint (PUT /0/public/InstrumentDefinitions) returns static reference data for instruments: symbol, description, market sector, listing status, quote asset, trading parameters and contract terms. It currently returns Kraken US Perps instruments. Other instruments will be added later.
- The endpoint is on
https://api.kraken.com. It is public, so it needs no API key, but it is rate limited per IP address (a burst of 10 requests, then 1 per second) - Definitions do not change intraday: fetch them at least once a day
- Results are cursor-paginated, so keep requesting with
cursor.nextuntil the response has nocursor - To get only some instruments, send their ids in
instrument_ids(up to 1,000). Omit it to get all of them instrument_idis the id the SBE market data feed carries, so you can join the two- Trading status and other intraday data stay in the SBE market data feed
Related
API Reference
All Exchange API references.
Connectivity
Connectivity and colocation guides.