Skip to main content
About this API:
Environment URLs
  • Production: tcp+ssl://fix-ord.exchange.coinbase.com:6121
  • Sandbox: tcp+ssl://fix-ord.sandbox.exchange.coinbase.com:6121
FIX5 Resets Saturdays at 1PM ETFIX5 Order Entry and Market Data customers will be logged out every Saturday at 1PM ET (6PM UTC).

Components

Standard Header

Fields that go at the beginning of every message. This exists for all messages sent and received.

Standard Trailer

Fields that go at the end of every message.

Administrative

Logon (35=A)

First message that is required immediately upon connection to authenticate the connection. MsgSeqNum always equals 1 (34=1) on this message in both directions.

FIX 5.0 Logon Details:

FIX 5.0 is separated into two different layers an application layer and a session layer. The application layer is version 5.0 and the session layer is version T1.1.
  • For all LOGON messages use MsgSeqNum 1, set 553 Username to the api key, and only create one session per API Key.
  • The begin string will use the session layer version 8=FIXT.1.1
  • The application layer version will be specified on the DefaultAppVerID which is tag 1137. This should be set to 9 (This represents version 5.0).
  • Sequence numbers must not include leading zeros (e.g., “0001” is invalid, whereas “1” is valid). Using sequence numbers with leading zeros will result in an invalid signature error.
  • Fractional seconds must be specified using exactly three digits. For example, 52=20230822-20:43:30.000 is supported, while both 52=20230822-20:43:30 (no fractional seconds) and 52=20230822-20:43:30.123456789 (excessive precision) will result in a signature calculation error.
The Logon message sent by the client must be signed for security. The signing method is shown below. The prehash string is the following fields joined: SendingTime, MsgType, MsgSeqNum, SenderCompID (API KEY), TargetCompID, Passphrase.. There is no trailing separator. The RawData field should be a base64 encoding of the HMAC signature.
To establish multiple FIX connections, a unique API key must be generated for each connection. A maximum of 75 connections is allowed per profile. Reusing a single API key for simultaneous connections will result in an error.

FIX 5.0 How to resume a session:

When a session disconnects, the following steps outline the client-server interaction: After session disconnect:
  1. Client Logon: The client initiates a LOGON message with MsgSeqNum 1 and 141 (ResetSeqNumFlag) = N.
  2. Server Response: The server responds with a LOGON message (also with MsgSeqNum = 1), immediately followed by a Sequence Reset message. This Sequence Reset includes 36 (NewSeqNo), which communicates the last sequence number from the previous session.
  3. Client Resend Request:
    • The client then sends a Resend Request with MsgSeqNum 2.
    • This request specifies 7 (BeginSeqNo) = 2 and 16 (EndSeqNo) = NewSeqNo (from the server’s previous Sequence Reset).
    • Paging Large Gaps: If NewSeqNo is greater than 1000, the client requests 7 (BeginSeqNo) = 2 and 16 (EndSeqNo) = 1000. This indicates an intent to page sequence numbers in blocks of 1000. Subsequent blocks would follow this pattern (e.g., 7 (BeginSeqNo) = 1001 to 16 (EndSeqNo) = 1999, or NewSeqNo if less than 2000).
  4. Admin Message and Older Message Policy: We do not replay administrative messages or messages older than one hour. For any such gaps, a Sequence Reset is sent.
  5. Waiting for Resend Completion: Before requesting the next page of sequence numbers, the client must wait for the current resend request to be completed.

Heartbeat (35=0)

Sent at a prearranged interval from both sides to indicate liveness of the connections and used in response to a TestRequest message (35=1).

TestRequest (35=1)

This message forces the other side of the connection to send a Heartbeat message (35=0) with the TestReqID (tag 112) populated with the same value provided on this message.

ResendRequest (35=2)

Sent by the customer to Coinbase to request the retransmission of a range of messages on a given FIX session. The Coinbase FIX gateway keeps a 4 hour history of messages sent to customers:
  • Administrative messages are always replaced by SequenceReset-GapFill messages during retransmission.
  • Older non-administrative messages are also replaced by SequenceReset-GapFill messages.
  • Retransmitted messages, including SequenceReset-GapFill messages, have PossDupFlag enabled (43=Y) in the header.
The maximum allowed range per request is 1000 messages and only 1 ResendRequest can be processed at a time per session.

SequenceReset (35=4)

Used to skip messages during retransmission. Coinbase only supports “GapFill” mode where GapFillFlag is always true. Coinbase sends SequenceReset-GapFill messages to customers with or without PossDupFlag (43) in the header:
  • Without PossDupFlag: Coinbase sends immediately after logon to reset the Coinbase sequence number to the next outbound sequence number stored for the session.
  • With PossDupFlag=Y: Coinbase sends in response to a ResendRequest for all administrative messages, irrespective of time sent, as well as non-administrative messages older than 4 hours.

Reject (35=3)

A session level reject message sent when the FIX session can’t process a message.

Logout (35=5)

Sent by either side to initiate session termination. The side which receives this message first should reply with the same message type to confirm session termination.

Trading

NewOrderSingle (35=D)

Used to submit a new spot order to the Exchange matching engine.
For more information on specific order variants see TPSL Orders, and Limit With Funds Orders.

NewOrderBatch (35=U6)

Used to submit new spot orders to the Exchange matching engine. Clients should use this message to submit multiple orders to the Exchange matching engine at the same time. Currently, all the orders submitted in a batch must be for the same symbol.

NewOrderBatchReject (35=U7)

This message is sent by Coinbase Exchange back to clients when all the orders in a New Order Batch (35=U6) Request are rejected. When only some of the orders are rejected, Execution Report - Rejected messages are sent out for each of the orders individually.

OrderCancelRequest (35=F)

Coinbase RecommendsFor order cancel requests, Coinbase recommends that you use the same FIX connection that was used to place the order.
Used to cancel an order that is still live on the Exchange matching engine.

OrderCancelReject (35=9)

This message is sent by Coinbase Exchange back to clients to reflect that an order could not be canceled on the matching engine in the following situations:

OrderCancelBatch (35=U4)

Coinbase RecommendsFor order cancel batch requests, Coinbase recommends that you use the same FIX connection that was used to place the order.
Clients should use this message to cancel multiple orders on the Exchange matching engine at the same time. Currently, all the orders canceled in a batch must be for the same symbol.

OrderCancelBatchReject (35=U5)

This message is sent by Coinbase Exchange back to clients when all the orders in an Order Cancel Batch (35=U4) Request could not be canceled. When only some of the orders could not be canceled, Order Cancel Reject (35=9) messages are sent out for the orders individually.

OrderCancelReplaceRequest (35=G)

Use Original FIX ConnectionYou must send order cancel replace requests via the same FIX connection through which the original order was placed.
Clients should use this message to modify a single order on the Exchange matching engine. Supported order types include Limit, Stop Limit, and Take Profit Stop Loss orders. If order quantity is increased or order price is modified, queue priority is lost. Queue priority is maintained when order quantity is decreased. For Stop Limit and TPSL orders, the stop trigger priority is only altered when StopPx is modified. Modified orders share the same exchange OrderID(37) as the parent order. Orders are modified with “in-flight mitigation” - i.e. any partially filled quantity on the parent order is carried over to the child order and is reflected in the new order’s remaining quantity LeavesQty(151).
Triggered Orders Cannot Be ModifiedOnce a Stop Limit or TPSL order has triggered, it cannot be modified. For TPSL orders, this applies when either the take profit or stop loss leg triggers.

OrderStatusRequest (35=H)

Used to query the current status of a single order previously placed on the profile associated with the session’s API key. Coinbase responds with an ExecutionReport (35=8) carrying ExecType (150) = I (Order Status).
Identify the order to query by ClOrdID (11) and/or OrderID (37) — at least one is required. If both are supplied, ClOrdID is used. Only orders belonging to the requesting session’s profile can be queried; wildcards are not supported.
The response is an ExecutionReport (35=8) with ExecType (150) = I (Order Status); see that message for the full set of fields returned. OrdStatus (39) reflects the order’s current state: Supported values:
0 = New
1 = Partially Filled
2 = Filled
4 = Canceled
8 = Rejected
C = Expired (for IOC expirations)
A = Pending New (the order has been accepted but is not yet active on the matching engine)
A rejected status query is still returned as an ExecutionReport (35=8) with ExecType (150) = I (Order Status) — the same ExecType as a successful response. If the order cannot be found — or neither ClOrdID nor OrderID is supplied — OrdStatus (39) = 8 (Rejected) and OrdRejReason (103) = 5 (Unknown Order), with the request’s ClOrdID (11) echoed back. A malformed request — one that fails validation, for example missing the required Symbol (55) — is instead rejected with a BusinessMessageReject (35=j), not an ExecutionReport.
OrderStatusRequest is not available on Drop Copy sessions, which are read only. Sending one on a drop copy session returns a BusinessMessageReject (35=j).

OrderMassCancelRequest (35=q)

Sent by customer to Coinbase to request mass cancellation of all orders on a FIX session previously submitted by customer.
At this time, only mass cancels for Trading Sessions are supported (530=6).
Not guaranteedLike Cancel on Disconnect, orders that were sent by the customer, but not yet acknowledged by the exchange, are not guaranteed to be canceled.

OrderMassCancelReport (35=r)

Sent by Coinbase to the customer as an acknowledgement of an Order Mass Cancel Request for processing or a rejection of the request. Receipt of a successful Order Mass Cancel Report does not imply that orders were canceled until “Execution Report - Canceled” is sent to customer.

ExecutionReport (35=8)

This message is sent by Coinbase Exchange back to clients to reflect changes to an order’s state (accepted, replaced, restated, partially filled, filled, expired, or canceled).

BusinessMessageReject (35=j)

An application level reject message sent when the FIX session can’t process a message.

RFQ

Quote Request (R)

A Quote Request (R) is the start of the RFQ process. Coinbase sends a Quote Request to Liquidity Providers (LPs) on behalf of a customer looking to participate in an RFQ trade. LPs respond to a Quote Request with a Quote.

Quote (S)

Quote (S) messages are submitted by Liquidity Providers (LP) in response to a Quote Request in order to participate in the competitive RFQ auction. Quotes can be submitted as either a one-way or two-way quote, and must be received by the ValidUntilTime (62) specified in the Quote Request. Only one side is traded if the Liquidity Provider wins the RFQ.

Quote Status Report (AI)

Quote Status Reports are sent to Liquidity Providers with Quote statuses and expired Quote Requests.
  • If the Quote is rejected b/c validation checks failed or it was sent too late, the response to the quoter is 297=5 (QuoteStatus = Rejected).
  • If the Quote is accepted and eligible to participate in an RFQ auction, the response to the quoter is 297=16 (QuoteStatus = Active).
  • If the Quote is accepted but not selected for execution, the response to the quoter is 297=17 (QuoteStatus = Canceled).
  • If the Quote is accepted and selected for execution, the response to the quoter is 297=19 (QuoteStatus = Pending End Trade), followed by Execution Report - Filled.
  • If the Quote Request is unmatched by ExpireTime (126) on the Quote Request, 297=7 (QuoteStatus = Expired) is broadcast to all LPs.

RFQ Request (AH)

Request For Quote (RFQ) allows Liquidity Providers to respond to, and interact with, real-time RFQ requests. The RFQ process begins with Quote Request (R). RFQ is enabled for users who have been approved by Coinbase as a Liquidity Provider. Once approved, clients must send an RFQ Request message (35=AH) after each successful Logon message (35=A) for any session in which they are interested in receiving Quote Requests.
Not receiving a response is expected and indicative of a successful RFQ Request.