Skip to main content

Exchange FIX Market Data Messages 5.0

The FIX market data API provides an L3 feed only with direct, low-latency, deterministic access.

About this API:

Environment URLs
  • Production: tcp+ssl://fix-md.exchange.coinbase.com:6121
  • Sandbox: tcp+ssl://fix-md.sandbox.exchange.coinbase.com:6121

You can connect with the same authentication as our existing FIX order entry system. Connectivity is limited to a single connection per API keyOrder Entry rate limits do not apply (connections, rps, burst rps).

FIX5 Resets Saturdays at 1PM ET

FIX5 Order Entry and Market Data customers will be logged out every Saturday at 1PM ET.

A standard header must be present at the start of every message in both directions.

TagFieldNameTypeRequiredNotes
8BeginStringStringYMust be FIXT.1.1
49SenderCompIDStringYClient API key (on messages from the client)
56TargetCompIDStringYMust be Coinbase (on messages from client)

Logon (35=A)

TagFieldNameTypeRequiredNotes
34MsgSeqNumIntYMust be 1
98EncryptMethodIntYMust be 0 (None)
108HeartBtIntIntYHeartbeat interval is capped at 300s, defaults to 10s
553UsernameStringYAny string is accepted
554PasswordStringYClient API passphrase
95RawDataLengthIntYNumber of bytes in RawData field
96RawDataStringYClient message signature
1137DefaultApplVerIDStringYMust be 9 (FIX 5.0 SP2)

Market Data Request (35=V)

Clients should use this message to subscribe to or unsubscribe from market data for one or more symbols.

TagFieldNameTypeRequiredNotes
262MDReqIDStringYClient identifier for the market data request
263SubscriptionRequestTypeIntY1=Subscribe
2=Unsubscribe
146NoRelatedSymIntYHow many symbols are in the request
=>55SymbolStringYRepeating group of symbols for which the client requests market data

Market Data Request Reject (35=Y)

This message is sent to clients to reject an invalid market data request.

TagFieldNameTypeRequiredNotes
262MDReqIDStringYClient identifier for the market data request
281MDReqRejReasonCharY0=Unknown symbol
1=Duplicate MDReqID
7=Other
58TextStringNError description

Security Status (35=f)

This message is streamed to clients together with the incremental updates for subscribed symbols and reflects changes in the trading status, tick size, or other attributes of an instrument.

TagFieldNameTypeRequiredNotes
262MDReqIDStringYClient identifier for the market data request
83RptSeqLongYPublic sequence number by symbol
55SymbolStringYRepeating group of symbols for which the client requests market data
1682MDSecurityTradingStatusStringYtrading_disabled
cancel_only
post_only
limit_only
full_trading
auction_mode
969MinPriceIncrementDecimalYMinimum increment for quote currency (e.g., 0.01 USD for BTC-USD)
29003MinSizeIncrementDecimalYMinimum increment for base currency (e.g., 0.00000001 BTC for BTC-USD)

Market Data Incremental Refresh (35=X)

Coinbase Exchange sends L3 order-by-order updates so clients can build a full book of all open orders, plus acknowledgements of orders by the matching engine with the order’s client order ID (ClOrdID) before matching. This helps clients immediately identify which orders and trades in the book (both aggressive and passive) are theirs, as well gain advance knowledge of orders that are pending processing by the matching engine. These acks correspond to the Received message in the web-socket feed.

  • When MDEntryID is not present, the message is the acknowledgement of an order prior to matching.
  • When MDEntryID is present, the message should be used for book-building. You can ignore Change messages with an MDEntryID for which you never received a New message.
info

When book-building, Change messages received before a corresponding New message can be ignored. Users may occasionally receive Change messages with MDUpdateAction=1 and an MDEntryID with Text=CHANGE_REASON_STP when the quantity on the original received order was reduced due to Self-trade Prevention (prior to the order being placed on the order book).

If the order has any remaining quantity resting on the book after any aggressive trades, customers will receive a New message with MDUpdateAction=0 and the same MDEntryID with MDEntrySize reflecting the remaining passively resting quantity of the order.

TagFieldNameTypeRequiredNotes
262MDReqIDStringYClient identifier for the market data request
268NoMDEntriesIntYAlways 1
=>279MDUpdateActionCharY0=New
1=Change
2=Delete
=>269MDEntryTypeCharY0=Bid
1=Offer
2=Trade
=>278MDEntryIDStringNIf present, this ID is the order ID that should be used for book-building
If not present, this message is the initial ack and should not be used to build the book
=>83RptSeqLongYPublic sequence number by symbol
=>55SymbolStringYRepeating group of symbols for which the client requests market data
=>270MDEntryPxDecimalYThe price of the order
=>271MDEntrySizeDecimalYThe quantity remaining of the order
=>60TransactTimeUTCTimestampYThe engine timestamp of the order in microseconds
=>40OrdTypeCharNSent only if the message represents the initial ack of an order:
1=Market
2=Limit
=>11ClOrdIDStringNThe client order ID on the initial ack of an order
=>37OrderIDStringNThe exchange order ID on the initial ack of an order
OR
If MDEntryType=2, then this is the aggressive Order ID
=>58TextStringNIf MDEntryType=1, then the possible values are:
CHANGE_REASON_STP
CHANGE_REASON_MODIFY_ORDER
CHANGE_REASON_REMAINDER_AFTER_MODIFICATION
If MDEntryType=2, then the possible values are:
CANCELED
FILLED
=>5797AggressorSideIntNSent only on trades MDEntryType=2
1=Buy
2=Sell
=>29004FundsDecimalNMarket orders may have an optional funds field which indicates how much quote currency is used to buy or sell

Market Data Snapshot Full Refresh (35=W)

This message provides a full snapshot of all orders in the order book, including those placed before the client subscribed to incremental market data.

A snapshot is requested automatically when a successful Market Data Request from the client is processed for a given symbol. Clients should queue up incremental updates and process only the incremental updates with sequence number RptSeq greater than the RptSeq in the initial MD Snapshot Full Refresh snapshot message.

If clients are already subscribed to a symbol and send another Market Data Request to subscribe, they will not receive a new snapshot for that symbol. Clients must unsubscribe and subscribe to the market data again for a given symbol to receive a new snapshot.

TagFieldNameTypeRequiredNotes
262MDReqIDStringYClient identifier for the market data request
83RptSeqLongYPublic sequence number for the final update in the snapshot by symbol
893LastFragmentCharYIs this the last message in the snapshot for a given symbol
Y=Yes
N=No
55SymbolStringYRepeating group of symbols for which the client requests market data
268NoMDEntriesIntYNumber of orders to be added to the book in this snapshot message
1682MDSecurityTradingStatusStringYtrading_disabled
cancel_only
post_only
limit_only
full_trading
auction_mode
=>269MDEntryTypeCharY0=Bid
1=Offer
=>278MDEntryIDStringYThe order ID that should be added to the book
=>270MDEntryPxDecimalYThe price of the order
=>271MDEntrySizeDecimalYThe quantity remaining of the order

Security List Request (35=x)

This message is sent by clients to request a full list of instruments that Coinbase Exchange supports together with each instrument’s trading status, tick size, minimum order quantity, and any other descriptive fields.

TagFieldNameTypeRequiredNotes
320SecurityReqIDStringYClient identifier for the request
559SecurityListRequestTypeIntYAlways 4=All Securities

Security List (35=y)

Instrument definition messages are returned in response to a client’s Security List Request.

TagFieldNameTypeRequiredNotes
320SecurityReqIDStringYClient identifier for the request
322SecurityResponseIDStringYResponse ID for the Security List Request
560SecurityRequestResultIntY0=Valid Request
1=Invalid Request
893LastFragmentCharYIs this the last instrument definition message in response to the original request
Y=Yes
N=No
393TotNoRelatedSymIntYTotal number of symbols that will be sent cumulatively
146NoRelatedSymIntYHow many symbols are in this FIX message
1682MDSecurityTradingStatusStringYtrading_disabled
cancel_only
post_only
limit_only
full_trading
auction_mode
=>55SymbolStringYRepeating group of symbols for which the client requests market data
=>15CurrencyStringYThe quote currency for the symbol (e.g., USD if 55=BTC-USD)
=>562MinTradeVolDecimalYThe minimum notional amount in quote currency terms for an order
=>969MinPriceIncrementDecimalYMinimum increment for quote currency (e.g., 0.01 USD for BTC-USD)
=>29003MinSizeIncrementDecimalYMinimum increment for base currency (e.g., 0.00000001 BTC for BTC-USD)

Was this helpful?