tcp+ssl://fix.exchange.coinbase.com:4198
tcp+ssl://fix-public.sandbox.exchange.coinbase.com:4198
Tag | Name | Description |
---|---|---|
8 | BeginString | Must be FIX.4.2 |
49 | SenderCompID | Client API key (on messages from the client) |
56 | TargetCompID | Must be Coinbase (on messages from the client) |
999 | CoinbaseProductSeq | Response header only (returned on Execution Reports). Represents market sequence. |
500
for that given product.Tag | Name | Description |
---|---|---|
34 | MsgSeqNum | Must be 1 |
98 | EncryptMethod | Must be 0 (None) |
108 | HeartBtInt | Must be ≤ 30 (secs). Values greater are capped at 30 . Server sends Test Request if client messages are not received in approximately (HeartBtInt x 1.5) seconds. Server terminates session if client messages are not received in approximately (HeartBtInt x 2 seconds). |
141 | ResetSeqNumFlag | If set to Y , reset sequence numbers for both sides of the FIX session. |
554 | Password | Client API passphrase |
96 | RawData | Client message signature (see below) |
8013 | CancelOrdersOnDisconnect | S : Batch cancel all open orders placed during session; Y : Batch cancel all open orders for the current profile. The latter is more performant and recommended. |
9406 | DropCopyFlag | If set to Y , execution reports are generated for all user orders (defaults to Y ). |
SendingTime, MsgType, MsgSeqNum, SenderCompID, TargetCompID, Password
.
There is no trailing separator. The RawData
field should be a base64 encoding of the HMAC signature.
75
connections per profile. Do not use a single API key for multiple connections at the same time.SendingTime
must be within 5 minutes of server time in UTC.500
open orders on a product. Once reached, the profile cannot place any new orders until the total number of open orders is below 500
.
Tag | Name | Description |
---|---|---|
11 | ClOrdID | UUID selected by client to identify the order This shouldn’t match the ClOrdID of any open orders. |
55 | Symbol | Required symbol to identify the new order, e.g., BTC-USD |
54 | Side | Must be 1 to buy or 2 to sell |
44 | Price | Limit price (e.g., in USD) (Limit order only) |
38 | OrderQty | Order size in base units (e.g., BTC) |
152 | CashOrderQty | Order size in quote units (e.g., USD) (Market or Limit order only) |
40 | OrdType | Must be 1 for Market, 2 for Limit, 4 for Stop Limit, O for Take Profit Stop Loss |
99 | StopPx | Stop price for order |
59 | TimeInForce | Must be a valid TimeInForce value. See the table below (Limit order only) |
126 | ExpireTime | Time/Date (in UTC) of order expiration for Good Till Date (GTD) only. The order expires within one second after the specified time. |
1109 | TriggerPriceDirection | The side from which the trigger price (or last trade price) is reached. Valid values:
|
7928 | SelfTradePrevention | Optional, see the table below |
Value | Description |
---|---|
D | Decrement and cancel (the default) |
O | Cancel resting order |
N | Cancel incoming order |
B | Cancel both orders |
ExecType=D
indicating unsolicited OrderQty
reduction (i.e., partial cancel).
See the self-trade prevention documentation for more details about this field.
Value | Policy | Abbr |
---|---|---|
1 | Good Till Cancel | GTC |
3 | Immediate or Cancel | IOC |
4 | Fill or Kill | FOK |
6 | Good Till Date (90-day hard limit) | GTD |
P | Post-Only (GTC & make liquidity only) |
P
) indicates that the order should only make liquidity. If any part of the order results in taking liquidity, the order is rejected and no part of it executes. Open Post-Only orders are treated as Good Till Cancel.ExecType=8
is sent back, signifying that the order was rejected.
15
orders per message. All orders must have the same symbol.
Each profile can place a maximum of 500
open orders on a product. Once reached, the profile cannot place any new orders until the total number of open orders is below 500
. If the total number of open orders in the batch causes the profile to exceed the 500
maximum, the entire batch is rejected.
Tag | Name | Description |
---|---|---|
8014 | BatchID | UUID selected by client to identify this New Order Batch request |
73 | NoOrders | Number of orders in this message (number of repeating groups to follow). Must be less than or equal to 15. |
11 | ClOrdID | UUID selected by client for the order. Must be the first field in the repeating group. This shouldn’t match the ClOrdID of any open orders. Additionally, it shouldn’t match any other ClOrdIDs in this batch. |
55 | Symbol | Required symbol to identify the new order (e.g., BTC-USD ) |
54 | Side | Must be 1 to buy or 2 to sell |
44 | Price | Limit price (e.g., in USD) |
38 | OrderQty | Order size in base units (e.g., BTC) |
40 | OrdType | Must be 2 for Limit |
59 | TimeInForce | Must be a valid TimeInForce value |
126 | ExpireTime | Time/Date (in UTC) of order expiration for Good Till Date (GTD) only. The order expires within one second after the specified time. |
7928 | SelfTradePrevention | Optional, see the table above |
Tag | Name | Description |
---|---|---|
11 | ClOrdID | UUID selected by client to identify this cancel request |
37 | OrderID | OrderID from the ExecutionReport with OrdStatus=New (39=0) |
41 | OrigClOrdID | ClOrdID from the New Order Single. When supplying this value, you do not need to supply an OrderID. |
55 | Symbol | Required symbol of the order to cancel (must match Symbol of the Order). |
58 | Text | Free format text string |
Tag | Name | Description |
---|---|---|
37 | OrderID | OrderID of order to be sent back. |
11 | ClOrdID | ClOrdID of order to be sent back. When supplying this value, you do not need to supply an OrderID. |
55 | Symbol | Required symbol to identify the order, e.g., BTC-USD |
ExecType=I
. The ExecutionReport contains the ClOrdID
if the value is supplied. If the order cannot be found, the ExecutionReport has OrderID=0
.
15
orders per message. All orders must have the same symbol.
Tag | Name | Description |
---|---|---|
8014 | BatchID | UUID selected by client to identify this Order Batch Cancel Request |
73 | NoOrders | Number of orders in this message (number of repeating groups to follow). Must be less than or equal to 15. |
41 | OrigClOrdID | UUID selected by client for the order. Must be the first field in the repeating group. |
55 | Symbol | Required symbol of the order to cancel (must match Symbol of the Order) |
37 | OrderID | OrderID from the ExecutionReport with OrdStatus=New (39=0). If present, this field takes precedence over OrigClOrdID to identify the order (optional). |
11 | ClOrdID | UUID selected by client to identify this cancel request |
OrderStatusRequest
.
Tag | Name | Description |
---|---|---|
6 | AvgPx | Calculated average price of all fills on this order. Only populates Exec Report if CumQty > 0 |
11 | ClOrdID | Only present on order acknowledgements, ExecType=New (150=0) |
14 | CumQty | Currently executed quantity for chain of orders. Populates Exec Report when:
|
17 | ExecID | Unique identifier of execution message as assigned by broker |
37 | OrderID | OrderID from the ExecutionReport with ExecType=New (150=0) |
39 | OrdStatus | Order status as of the current message |
55 | Symbol | Symbol of the original order |
54 | Side | Must be 1 to buy or 2 to sell |
32 | LastShares | Amount filled (if ExecType=1). Also called LastQty as of FIX 4.3 |
44 | Price | Price of the fill if ExecType indicates a fill, otherwise the order price |
38 | OrderQty | OrderQty as accepted (may be less than requested upon self-trade prevention). Represents original order quantity when OrdStatus is Canceled or Done for day. |
58 | Text | Human-readable description of the reject or cancel (optional)
|
60 | TransactTime | Time the event occurred |
103 | OrdRejReason | Insufficient funds=3 , Post-only=8 , Unknown error=0 |
136 | NoMiscFees | 1 (Order Status Request responses and fill reports) |
137 | MiscFeeAmt | Fee amount (absolute value for Order Status Request responses, percentage value for fill reports) |
138 | MiscFeeCurr | Fee currency |
139 | MiscFeeType | 4 (Exchange fees) (Order Status Request responses and fill reports) |
150 | ExecType | May be 1 (Partial fill) for fills, D for self-trade prevention, etc. |
151 | LeavesQty | Quantity open for further execution. Populates Exec Report when:
|
152 | CashOrderQty | Order size in quote units (e.g., USD) (Market order only) |
891 | MiscFeeBasis | 2 (Percentage fee basis) (fill report only) |
1003 | TradeID | Product unique trade id |
1057 | AggressorIndicator | Y for taker orders, N for maker orders |
ExecType | Description |
---|---|
0 | New Order |
1 | Partial Fill |
3 | Done |
4 | Canceled |
7 | Stopped |
8 | Rejected |
D | Restated (Order Changed due to STP) |
I | Order Status |
Tag | Name | Description |
---|---|---|
8014 | BatchID | BatchID from the New Order Batch message |
58 | Text | Human-readable description of the error (optional) |
Tag | Name | Description |
---|---|---|
37 | OrderID | Unique identifier of most recent order as assigned by broker This shouldn’t match the ClOrdID of any open orders. |
41 | OrigClOrdID | ClOrdID <11> of previous order (NOT initial order of the day) when canceling or replacing an order |
11 | ClOrdID | Unique identifier of replacement order as assigned by institution. |
55 | Symbol | Must match original order |
54 | Side | Must match original side |
38 | OrderQty | Total Intended Order Quantity (including the amount already executed for this chain of orders) |
60 | TransactTime | Time this order request was initiated/released by the trader or trading system |
40 | OrdType | Only limit orders are supported for now (2) |
44 | Price | Price per share |
OrderQty (38)
is less than the filled size of the order, Coinbase cancels the order and marks it as filled."reason": "modify_order"
.
After the immediate match, if there is any quantity remaining on the modified order, you should receive a new change message with "reason":"remainder_after_modification"
which reports the new / old prices as a result of the Modify Order.
match + done
message for the order at the newly modified price.
OrderCancelReject
with text (when processing the last cancel replace request). This can occur when our system is backlogged and unable to process this Modify Order Request (or OrderCancelReplaceRequest
).Tag | Name | Description |
---|---|---|
11 | ClOrdID | As on the cancel request |
37 | OrderID | As on the cancel request |
41 | OrigClOrdID | As on the cancel request |
39 | OrdStatus | 4 if too late to cancel |
102 | CxlRejReason | 1 if the order is unknown |
434 | CxlRejResponseTo | 1 (Order Cancel Request) |
Tag | Name | Description |
---|---|---|
8014 | BatchID | BatchID from the New Order Batch message |
58 | Text | Human-readable description of the error (optional) |
Tag | Name | Description |
---|---|---|
45 | RefSeqNum | MsgSeqNum of the rejected incoming message |
371 | RefTagID | Tag number of the field which caused the reject (optional) |
372 | RefMsgType | MsgType of the rejected incoming message |
58 | Text | Human-readable description of the error (optional) |
373 | SessionRejectReason | Code to identify reason for reject |
Value | Description |
---|---|
1 | Required tag missing |
5 | Value is incorrect (out of range) for this tag |
6 | Incorrect data format for value |
11 | Invalid MsgType (35) |
Tag | Name | Type | Required | Notes |
---|---|---|---|---|
644 | RFQReqID | UUID | Y | |
146 | NoRelatedSym | Int32 | N | Repeating group for number of symbols in the subscription message |
55 | Symbol | String32 | Y |
Tag | Name | Type | Required | Notes |
---|---|---|---|---|
131 | QuoteReqID | UUID | R | |
146 | NoRelatedSym | Int32 | Y | Always 1 |
55 | Symbol | String32 | Y | Example: BTC-AVAX |
38 | OrderQty | Float64 | Y | |
62 | ValidUntilTime | UTCTimestamp | Y | UTC millis20220712-00:00:00.000 |
126 | ExpireTime | UTCTimestamp | Y | UTC millis20220712-00:00:00.000 |
303 | QuoteRequestType | Char | Y | 1 = Manual Accept 2 = Automatic Accept (default) |
891 | MiscFeeBasis | INT | Y | Always 2 = Percentage |
137 | MiscFeeAmt | AMT | Y | Basis point fee to market makers (MMs) |
528 | OrderCapacity | Char | Y | A = Agency (default) C = Corporate |
2 = Automatic Accept
for the current implementation of RFQ on Coinbase Exchange.
MiscFeeBasis (891) is always 2 = Percentage
for the current implementation of RFQ on Coinbase Exchange.ValidUntilTime
(Tag=62) specified in the Quote Request message. The Quote can be submitted as either a one-way quote or two-way quote. Only one side is actioned on if participant wins RFQ.
Tag | Name | Type | Required | Notes |
---|---|---|---|---|
131 | QuoteReqID | UUID | Y | |
117 | QuoteID | UUID | Y | |
55 | Symbol | String32 | Y | Example: BTC-AVAX |
132 | BidPx | Float64 | C | Required if submitting a bid |
133 | OfferPx | Float64 | C | Required if submitting an offer |
134 | BidSize | Float64 | C | Required if submitting a bid. Must match OrderQty in Quote Request |
135 | OfferSize | Float64 | C | Required if submitting an offer. Must match OrderQty in Quote Request |
Tag | Name | Type | Required | Notes |
---|---|---|---|---|
131 | QuoteReqID | UUID | Y | |
117 | QuoteID | UUID | C | |
55 | Symbol | String32 | Y | Example: BTC-AVAX |
38 | OrderQty | Float64 | Y | Echoed from Quote 35=S |
132 | BidPx | Float64 | Y | Echoed from Quote 35=S |
133 | OfferPx | Float64 | Y | Echoed from Quote 35=S |
134 | BidSize | Float64 | C | Must match OrderQty in Quote Request |
135 | OfferSize | Float64 | C | Must match OrderQty in Quote Request |
62 | ValidUntilTime | UTCTimestamp | Y | UTC millis20220712-00:00:00.000 |
126 | ExpireTime | UTCTimestamp | Y | UTC millis20220712-00:00:00.000 |
297 | QuoteStatus | Int32 | Y | 5 = Rejected: Insufficient funds (in response to 35=S)7 = Expired:▪ Either no response to 35=S from liquidity providers ▪ Or best quote not accepted by counterparty 16 = Active: Quote successful (in response to 35=S) 17 = Canceled:▪ Either quoting window expired bc quote not best ▪ Or RFQ was unable to hold funds 19 = Pending Trade: RFQ selected for execution |
58 | Text | String | C | Required if QuoteStatus=5, Quote action was rejected |
Tag | Name | Description |
---|---|---|
7 | BeginSeqNo | Sequence number of first message in range to be resent |
16 | EndSeqNo | Sequence number of last message in range to be resent |
senderLocationID
when logging on (because you can have multiple connections per API key).
SenderLocationID <142> identifies the message originator’s location.
ResetSeqNumFlag=N
in your logon message (because, by default, we clear users sessions when logging on). You must also include the same senderLocationID
used in the previous session to continue the session.
ResetSeqNumFlag <141> is a boolean flag that indicates whether or not both sides of the FIX session should reset sequence numbers.
BeginSeqNo <7>
= EndSeqNo <16>
BeginSeqNo <7>
= first message in range; EndSeqNo <16>
= last message in rangeBeginSeqNo <7>
= first message in range; EndSeqNo <16>
= 2000th message from first message (999999
or 0
)Tag | Name | Description |
---|---|---|
112 | TestReqID | Copied from the Test Request, if any |
Tag | Name | Description |
---|---|---|
112 | TestReqID | Free text |