Skip to main content

Overview

Margin FIX uses standard FIX error messages with additional detail in the Text field. Errors fall into two categories:
  • Session-level errors: Protocol violations, handled with Reject (35=3)
  • Business-level errors: Application logic issues, handled with BusinessMessageReject (35=j) or order-specific rejection messages

Error Message Types

Reject (35=3)

Used for session-level protocol violations.

Session Reject Reasons (373)

BusinessMessageReject (35=j)

Used for application-level business logic errors.

Business Reject Reasons (380)

Order-Specific Rejections

Order Reject Reasons (103)

In ExecutionReport (35=8) with ExecType=Rejected:

Cancel Reject Reasons (102)

In OrderCancelReject (35=9):

Common Error Scenarios

Example: Invalid Tag
Example: Order Rejected by Exchange
Order-entry failures returned by the exchange are sent as ExecutionReport (35=8) with ExecType=Rejected, not as BusinessMessageReject. BusinessMessageReject (35=j) is used for application-layer failures before normal exchange rejection handling, such as rate limiting or listener-session restrictions.
Example: Insufficient Balance

Troubleshooting

MsgSeqNum Too High on Logon

Symptom: Logon fails or the server sends a ResendRequest for messages the client doesn’t have. Cause: The client is sending a MsgSeqNum higher than what the server last saw. This typically happens when the client’s local sequence store persists across sessions but the server has reset (e.g. after maintenance or a prior ResetSeqNumFlag=Y logon). Fix:
  • KalshiNR, KalshiDC: Set ResetSeqNumFlag<141>=Y on every Logon. These sessions require it; Logon will be rejected without it.
  • KalshiRT: If you don’t need to recover missed messages, set ResetSeqNumFlag<141>=Y to reset both sides to 1. If you do need retransmission continuity, ensure your local sequence store matches the server’s state.
If using QuickFIX, set ResetOnLogon=Y in your session config for non-retransmission sessions.

SendingTime Rejected

Symptom: Reject (35=3) with SessionRejectReason<373>=10. Cause: The client’s clock is more than 30 seconds off from the server. Sync your system clock via NTP.

Duplicate Session (“already exists”)

Symptom: Logout (35=5) immediately after Logon with Text<58>="already exists". Cause: Another FIX connection is already active with the same API key and TargetCompID. Only one connection is allowed per API key per session type. This can also occur if a previous connection was not cleanly closed and the server hasn’t yet detected the disconnect. Fix: Ensure the previous session is fully disconnected before reconnecting. If the prior connection was lost unexpectedly, wait for the server’s heartbeat timeout to expire (up to 60 seconds depending on your HeartbeatInt setting) before retrying. Use separate API keys for concurrent connections.

Logon Signature Rejected

Symptom: Logout immediately after Logon with a signature error. Cause: The SendingTime used in the pre-hash string doesn’t match the SendingTime<52> in the actual Logon message. If using a FIX library, the library may auto-populate SendingTime. Use that exact value when computing the signature, not a separately generated timestamp.