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.
SendingTime in SignatureThe SendingTime in the PreHashString must match exactly the value in field 52 of the Logon message. Format: YYYYMMDD-HH:MM:SS.mmm.SendingTime must be within 30 seconds of the server’s current time, or the message will be rejected with SessionRejectReason<373>=10.

Reconnecting

Use one active FIX connection per API key. If Logon is rejected, inspect Text (58) in the Logout (35=5) response:
  • already exists: check for another connection using the same key before retrying.
  • rate limit exceeded or FIX logon service busy; retry with backoff: retry with exponential backoff and jitter.
  • Authentication, permission, or invalid-field errors: correct the issue before retrying.
Avoid overlapping reconnect attempts. Generate a fresh SendingTime and signature for each attempt, and follow the sequence-number and retransmission rules below.

Heartbeat & Sequence Numbers

Message Retransmission

Message retransmission (ResendRequest, SequenceReset) is only supported on KalshiRT and KalshiPT.
For all other sessions, ResetSeqNumFlag<141> in the Logon message must always be Y or the Logon will be rejected.
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 and KalshiPT only. Lookback window limited to 24 hours (or up to 72 hours if MessageRetentionPeriod was set on Logon).

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, all open orders are canceled.