GeminiGemini
Demo environmentGet API key
  • Overview
  • Crypto Trading
  • Prediction Markets
  • Perpetuals
  • Stocks
  • API Reference
  • SDKs & Tools
Changelog
Gemini logoGemini logo

© 2026 Gemini Space Station, Inc.

Overview
Spot
    OverviewGet started
    Orders API
    Market Data API
    Fund Management API
    Instant Orders API
    WebSocket API
    FIX API
      Overview
        Dictionary
        ConnectingAllowed CharactersPrecision on the ExchangeStandard HeaderStandard Trailer
        Session-Level Messages
          LogonLogoutHeartbeatTest RequestResend RequestSequence ResetRejectBusiness Message RejectEstablishing a ConnectionEnding a ConnectionWhen Can Sequence Numbers Reset
      Order Entry
      Market Data
      Drop Copy
Margin
    Overview
    Margin REST API
      Get Margin Account SummaryGet Margin Interest RatesPreview Margin Order Impact
Staking
    Overview
    Staking REST API
      List Staking BalancesStake Crypto FundsUnstake Crypto FundsList Staking Event HistoryList Staking RatesList Staking Rewards
Clearing
    Clearing REST API
      Clearing Orders
      Broker & Trade Operations
Session-Level Messages

Establishing a connection

  1. Client sends server → Logon <A> message
  2. Is client ResetSeqNumFlag <141> set to Y?
    • Yes, reset sequence numbers and proceed:
      • Server resets the next expected client sequence number
      • Server resets its own sequence number
      • Server responds with ← Logon <A> message with reset sequence number
      • Client sends server → Heartbeat <0>
    • No, negotiate sequence numbers on both sides:
      1. Is client MsgSeqNum <34> value what the server is expecting?
        • No, value is greater than expected:
          • Server responds with ← Logon <A> message
          • Server sends client ← Resend Request <2>
          • Client sends server → Sequence Reset <4> (GapFillFlag <123> = Y)
        • No, value is less than expected:
          • Server disconnects
          • After checking what happened, client re-sends Logon <A> message with ResetSeqNumFlag <141> field set to Y
        • Otherwise:
          • server sends client ← Heartbeat <0>
      2. Is server MsgSeqNum <34> value what the client is expecting?
        • No, value is greater than expected:
          • Server responds with ← Logon <A> message
          • Client sends server → Resend Request <2>
          • If the server is unable to replay the messages due to technical reasons, it may send a Business Message Reject <j> message with:
            • BusinessRejectReason <380> set to 0 (Other)
            • Text <58> set to "Unable to process ResendRequest. Please contact support."
          • If there are no issues, the server proceeds to replay the messages to the client:
            • Server responds with ← message PossDupFlag <43> = Y
            • Replay from server to client is complete
            • Server responds with ← Heartbeat <0>
        • No, value is less than expected:
          • Client disconnects or sends server → Logout <5>
          • Gemini coordinates with the client to triage so the FIX connection can be re-established
        • Otherwise:
          • Client sends server → Heartbeat <0>
  3. Success! Your FIX connection is established.
Business Message RejectEnding a Connection