Skip to main content

API Key Setup

FIX API keys use the same key pair as the REST API: Ed25519 (recommended) or 2048-bit RSA. Generate a key pair and register the public key in your account profile, or generate one there. The API Key ID (UUID) is your SenderCompID.

Logon (35=A)

The initiator sends a Logon message. The acceptor responds with either a Logon (success) or Logout (failure).
Do not send SenderSubID<50> on Logon. Kalshi rejects it with a Logout; send operator identity per message instead — on NewOrderSingle, OrderCancelRequest, or OrderCancelReplaceRequest.

Required Fields

Optional Fields

Signature Generation

The RawData field must contain a base64-encoded signature of the pre-hash string: Ed25519 for Ed25519 keys, RSA-PSS with SHA-256 for RSA keys.
The SendingTime in the PreHashString must match exactly the value in field 52 of the Logon message. SendingTime must be within 30 seconds of the server’s current time, or the message will be rejected with SessionRejectReason<373>=10.

Heartbeat & Sequence Numbers

Message Retransmission

Message retransmission (ResendRequest, SequenceReset) is only supported on KalshiRT. ResetSeqNumFlag<141> must always be Y on KalshiNR and KalshiDC. The drop copy session provides an alternative way to query for missed execution reports. For a real-time streaming feed, see Listener Sessions.

ResendRequest (35=2)

KalshiRT only. Lookback window controlled by MessageRetentionPeriod.

Logout (35=5)

Either side may initiate a Logout. The counterparty responds with a Logout, and the transport connection is terminated. If CancelOrdersOnDisconnect=Y was set on Logon, the resting orders placed over FIX with this session’s API key are canceled.
CancelOrdersOnDisconnect is not an account-wide kill switch. It cancels only the resting orders that were placed over FIX with this session’s API key. Orders placed through the REST API, or over FIX with a different API key, keep resting. Cancel those separately.A connection that goes silent without closing is only detected by the idle timeout, after twice your HeartbeatInt with no inbound message. Cancellation starts after that detection and takes further time to complete; there is no guaranteed upper bound on when the orders are canceled. A shorter HeartbeatInt (minimum 3 seconds) shortens detection only. Confirm cancellation from the execution reports or by querying your orders, and do not rely on cancel-on-disconnect as your only protection.