Skip to main content
The Prime FIX API gives you real-time market data subscriptions and order execution over FIX 4.4. More data is available through the Prime WebSocket API.

Connectivity

You connect to the FIX API over the internet. Kraken gives you the hostname and port number during onboarding.

Configuration

Kraken is the acceptor for all FIX sessions. Kraken gives you the following session details during onboarding:
  • SenderCompID
  • TargetCompID
  • StartTime
  • EndTime
The example messages in these docs use the placeholder CompIDs KRAKEN_COMPID, CLIENT_COMPID and CLIENT_MD_COMPID. Use the SenderCompID and TargetCompID values you receive during onboarding instead.
Sessions can be configured with or without FIX session-level message recovery. A typical setup has two sessions:
  • A market data session with recovery disabled.
  • An order session with recovery enabled.
Each session authenticates with an API key and an HMAC signature in the Logon message. After your Prime account is onboarded, you can create and manage API keys from the Prime UI API settings. Sign in with your standard Kraken Pro credentials. You need separate API keys for the sandbox and production environments.

Protocol

The API follows the FIX 4.4 specification. See Header and Trailer for the standard fields on every message.

Timestamps

All timestamps are in UTC. Kraken sends timestamps with millisecond precision, for example 20140515-19:49:56.659. Kraken accepts timestamps in the format YYYYMMDD-HH:MM:SS.ffffff with second, millisecond or microsecond precision, for example 20140515-19:49:56, 20140515-19:49:56.659 or 20140515-19:49:56.659441.

Market data

After logon, send a Market Data Request to subscribe to market data snapshots. You can subscribe to aggregated prices as price levels or size levels. Kraken then streams a full snapshot each time the market changes. Market data is sent as full snapshots only. Delta updates will be supported in a future release.

Orders

Submit orders with New Order Single. You can amend orders with Order Cancel Replace Request and cancel them with Order Cancel Request. Order updates are sent as Execution Reports. Rejected cancel and replace requests are answered with an Order Cancel Reject. StopLimit, StopMarket and TakeProfitLimit orders are placed with order strategies. See Order Lifecycle for the messages exchanged as an order changes state.

Cancel on Disconnect

By default, all open orders submitted on a FIX session are canceled when that session disconnects. Cancel on Disconnect does not affect:
  • Orders for the same user that were submitted on other sessions.
  • Orders placed with CancelOnDisconnect(20030)=N on New Order Single.

Drop copy

Each session receives a full drop copy of all Execution Reports for the session user. This includes orders submitted through the Kraken UI or other protocols, such as the WebSocket API.