> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kraken.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Connectivity, session configuration, timestamps and order handling for the Prime FIX API.

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](https://docs.kraken.com/institutional/api-reference/prime-websocket/authentication.md).

## 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

> [!NOTE]
>
> 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](https://docs.kraken.com/institutional/api-reference/prime-fix/logon.md) message. After your Prime account is onboarded, you can create and manage API keys from the [Prime UI API settings](https://pro.kraken.com/app/prime/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](https://www.fixtrading.org/standards/fix-4-4/). See [Header and Trailer](https://docs.kraken.com/institutional/api-reference/prime-fix/header-trailer.md) 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](https://docs.kraken.com/institutional/api-reference/prime-fix/mdr.md) to subscribe to market data snapshots. You can subscribe to aggregated prices as price levels or size levels. Kraken then streams a [full snapshot](https://docs.kraken.com/institutional/api-reference/prime-fix/mdsfr.md) 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](https://docs.kraken.com/institutional/api-reference/prime-fix/nos.md). You can amend orders with [Order Cancel Replace Request](https://docs.kraken.com/institutional/api-reference/prime-fix/ocrr.md) and cancel them with [Order Cancel Request](https://docs.kraken.com/institutional/api-reference/prime-fix/ocr.md). Order updates are sent as [Execution Reports](https://docs.kraken.com/institutional/api-reference/prime-fix/er.md). Rejected cancel and replace requests are answered with an [Order Cancel Reject](https://docs.kraken.com/institutional/api-reference/prime-fix/ocrej.md).

StopLimit, StopMarket and TakeProfitLimit orders are placed with [order strategies](https://docs.kraken.com/institutional/api-reference/prime-fix/nos.md#order-strategies). See [Order Lifecycle](https://docs.kraken.com/institutional/api-reference/prime-fix/order-lifecycle.md) 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](https://docs.kraken.com/institutional/api-reference/prime-fix/nos.md).

## 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.
