> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Coinbase Derivatives: Predictions FIX Order Entry Messages

The Coinbase Derivatives: Predictions FIX Order Entry API lets you submit and cancel orders, receive execution and settlement reports, and recover missed fills over FIX 5.0 SP2.

## Order Entry Message Types

The Coinbase Derivatives: Predictions Order Entry FIX API supports the following message and execution types. For Logon, heartbeats, sequence recovery, and fill recovery, see [Session](/derivatives-predictions/fix/session).

> **Client Message Types**
>
> * [NewOrderSingle (35=D)](#newordersingle-35d): Submits a new limit or market order.
> * [OrderCancelRequest (35=F)](#ordercancelrequest-35f): Cancels one open order.
> * [OrderMassCancelRequest (35=q)](#ordermasscancelrequest-35q): Cancels multiple open orders.

> **System Message and Execution Types**
>
> * [ExecutionReport (35=8)](#executionreport-358): Reports order lifecycle events. Execution types are:
>   * [Pending New (150=A)](#pending-new-358-150a): Order accepted and held for the instrument's speed bump delay.
>   * [New (150=0)](#new-358-1500): Order accepted.
>   * [Trade (150=F)](#trade-358-150f): Order partially or fully filled.
>   * [Canceled (150=4)](#canceled-358-1504): Order canceled by request or by the exchange.
>   * [Expired (150=C)](#expired-358-150c): IOC remainder or FOK that could not fill.
>   * [Rejected (150=8)](#rejected-358-1508): Order rejected by the exchange.
> * [OrderCancelReject (35=9)](#ordercancelreject-359): Rejection of an `OrderCancelRequest`.
> * [OrderMassCancelReport (35=r)](#ordermasscancelreport-35r): Result of an `OrderMassCancelRequest`.
> * [MarketSettlementReport (35=UMS)](#marketsettlementreport-35ums): Firm position payout when an instrument settles.
> * [BusinessMessageReject (35=j)](#businessmessagereject-35j): Rejection not reportable with an `ExecutionReport`.

> **Fill Recovery Message Types**
>
> Documented on [Session](/derivatives-predictions/fix/session#fill-recovery), shared with drop copy:
>
> * [LastExecIDRequest (35=F1)](/derivatives-predictions/fix/session#lastexecidrequest-35f1): Client request for the `ExecID` of your newest fill.
> * [LastExecID (35=F2)](/derivatives-predictions/fix/session#lastexecid-35f2): System response to F1.
> * [EventResendRequest (35=F3)](/derivatives-predictions/fix/session#eventresendrequest-35f3): Client request to replay fills in an `ExecID` range.
> * [EventResendComplete (35=F4)](/derivatives-predictions/fix/session#eventresendcomplete-35f4): System response to a successful F3 request.
> * [EventResendReject (35=F5)](/derivatives-predictions/fix/session#eventresendreject-35f5): System response to an unsuccessful F3 request.

> **Session Message Types**
>
> Logon (35=A), Logout (35=5), Heartbeat (35=0), TestRequest (35=1), ResendRequest (35=2), Reject (35=3), and SequenceReset (35=4). See [Session](/derivatives-predictions/fix/session).

## Connection

Connect with `TargetCompID (56) = CPMOE` and your API key in `SenderCompID (49)`. The API key must have the `TRADE` permission. Host and port are listed on the [Coinbase Derivatives: Predictions Connectivity](/derivatives-predictions/connectivity) page. Header fields are on [Header/Trailer](/derivatives-predictions/fix/header-trailer). Logon, the Logon signature, heartbeats, sequence recovery, and [cancel on disconnect](/derivatives-predictions/fix/session#cancel-on-disconnect) are on [Session](/derivatives-predictions/fix/session).

SendingTime (52) and TransactTime (60) on messages you receive are UTC timestamps with microsecond precision.

For a read-only copy of your executions, use [FIX Drop Copy](/derivatives-predictions/fix/drop-copy). For order books and public trades, use [FIX Market Data](/derivatives-predictions/fix/market-data).

## Prices, quantities, and sides

Prices, quantities, and amounts are FIX decimal values, not scaled integers.

| Field type | Decimal places | Tags | Notes |
| :- | :- | :- | :- |
| Price | 3 | 44, 31, 6, 730 | YES price in USDC. Order prices range from `0.001` to `0.999`. |
| Quantity | 2 | 38, 32, 14, 151, 21054, 21055 | Contracts. Minimum increment `0.01`. |
| Amount | 6 | 137, 21009, 21056 | USDC. |

* Inbound values may carry fewer decimal places than the maximum. Extra decimal places are truncated toward zero, not rejected. For example, `44=0.6505` is read as `0.650`. Range checks apply after truncation.
* `Side (54)` always refers to the YES contract. `1` = Buy YES. `2` = Sell YES. There is no separate NO side on FIX. To buy NO at price `P`, sell YES at `1.000 - P`. To sell NO at price `P`, buy YES at `1.000 - P`.
* A YES price of `0.650` implies a probability of about 65%. YES price plus NO price equals `1.000`.

## Identifiers

`OrderID (37)`, `ExecID (17)`, `TrdMatchID (880)`, `MassActionReportID (1369)`, and `MarketSettlementReportID (20105)` are String fields that contain the decimal form of a 64-bit integer.

* Store them as strings or 64-bit integers. They exceed the range of a 32-bit integer.
* Echo `OrderID (37)` exactly as received on [OrderCancelRequest (35=F)](#ordercancelrequest-35f).
* `ExecID`, `MassActionReportID`, and `MarketSettlementReportID` share one increasing number space. Compare them numerically to order events. Values are not consecutive.
* `0` is a sentinel where no identifier exists, as described on each field.

`ClOrdID (11)`, `OrigClOrdID (41)`, and the sub-account `PartyID (448)` accept exactly two forms:

* At most 18 printable ASCII characters (`0x20` to `0x7E`).
* A 36-character lowercase hyphenated UUID (8-4-4-4-12, IETF variant 2).

Any other value is rejected with [BusinessMessageReject (35=j)](#businessmessagereject-35j), for example 19 to 35 characters, an uppercase UUID, 32-character hex, or a URN. Values are never truncated. `ClOrdID` also rejects UUIDs of the form `80000000-0000-0000-xxxx-xxxxxxxxxxxx`.

## NewOrderSingle (35=D)

Submits a new limit or market order. Problems detectable from the request alone are answered immediately with [BusinessMessageReject (35=j)](#businessmessagereject-35j) and no ExecutionReport follows. All other outcomes are reported with [ExecutionReport (35=8)](#executionreport-358).

| Tag | Name | FIX Type | Req | Description |
| :- | :- | :- | :- | :- |
| 11 | ClOrdID | String | Y | Client order ID, unique among your live orders. See [Identifiers](#identifiers) for the accepted forms. |
| 55 | Symbol | String | Y | Instrument ticker. Must match a listed instrument exactly. An unknown ticker is rejected with `Text (58) = unknown Symbol`. |
| 54 | Side | Char | Y | `1` = Buy YES. `2` = Sell YES. See [Prices, quantities, and sides](#prices-quantities-and-sides). |
| 38 | OrderQty | Qty | Y | Order quantity in contracts, 2 decimal places. |
| 44 | Price | Price | C | Limit price, 3 decimal places, from `0.001` to `0.999`. Required when `40=2`. Must not be sent when `40=1`. |
| 40 | OrdType | Char | Y | `1` = Market. `2` = Limit. A market order is priced at the worst admissible price (`0.999` for buy, `0.001` for sell) and runs as IOC. |
| 59 | TimeInForce | Char | N | `1` = GTC (default). `3` = IOC. `4` = FOK. |
| 18 | ExecInst | MultipleCharValue | N | Post-only mode. `6` = Post only: adjust the price so the order does not cross. `A` = Post only, reject if the order would cross. Space-delimited. If both are sent, the order is treated as `A`. Other values are ignored. |
| 7928 | SelfMatchPreventionId | Int | N | Self-match prevention ID. Must equal the ID registered for your user. See [Self-match prevention](#self-match-prevention). |
| 8000 | SelfMatchPreventionStrategy | Char | N | `N` = Cancel aggressing. `O` = Cancel resting. `Q` = Cancel both. See [Self-match prevention](#self-match-prevention). |
| 1028 | ManualOrderIndicator | Boolean | Y | CFTC Rule 1.35 audit flag. `Y` = Entered manually. `N` = Generated automatically. |
| 21009 | MaxExecutionCost | Amt | N | All-in spend cap in USDC, 6 decimal places. FOK only. See [Max execution cost](#max-execution-cost). |
| 453 | NoPartyIDs | NumInGroup | Y | Parties repeating group. Must contain the sub-account. |
| → 448 | PartyID | String | N | With `452=24`: the sub-account, in one of the forms listed in [Identifiers](#identifiers). With `452=1`: the numeric executing firm ID, as a positive decimal with no leading zeros. |
| → 452 | PartyRole | Int | N | `24` = Customer account (sub-account). Exactly one entry is required, with a non-empty PartyID. `1` = Executing firm. See [Executing firm](#executing-firm). Other roles are ignored. |

### Order type and price rules

| Request | Result |
| :- | :- |
| `40=2` without `44` | BusinessMessageReject, `Text (58) = INVALID_FIELD_VALUE: Price(44) is required for OrdType(40)=LIMIT(2)` |
| `40=1` with `44` | BusinessMessageReject, `Text (58) = INVALID_FIELD_VALUE: Price(44) must not be set for OrdType(40)=MARKET(1)` |
| `40=1` with `18=6` or `18=A` | BusinessMessageReject, `Text (58) = POST_ONLY_WOULD_CROSS: ExecInst(18) post-only is not compatible with a market order` |
| No `452=24` entry, or an empty sub-account | BusinessMessageReject, `Text (58) = INVALID_SUBACCOUNT: Parties with PartyRole=24 (CUSTOMER_ACCOUNT) is required` |
| Trading is locked for your API key, firm, or FCM | BusinessMessageReject, `Text (58) = USER_TRADING_LOCKED` |

A new sub-account string is not itself an error. The sub-account is created on first use.

### Executing firm

`PartyRole (452) = 1` selects the firm the order is placed for.

* API key scoped to a firm: optional. If sent, it must equal your firm's ID.
* API key scoped to an FCM: exactly one entry is required, naming an active firm under your FCM.

Violations are rejected with BusinessMessageReject. `Text (58)` is one of `FCM-scoped principal requires exactly one EXECUTING_FIRM`, `duplicate Parties entry with PartyRole=1 (EXECUTING_FIRM)`, `EXECUTING_FIRM is outside authenticated Firm scope`, `EXECUTING_FIRM is outside authenticated FCM scope`, `EXECUTING_FIRM is unknown or inactive`, or a PartyID format error.

### Max execution cost

`MaxExecutionCost (21009)` caps the total cost of an FOK order: the cost of the fills plus the taker fee. A buy costs the YES price times quantity. A sell costs `1.000 - price` times quantity.

| Condition | Result |
| :- | :- |
| `21009` with `TimeInForce (59)` other than `4` | BusinessMessageReject, `Text (58) = INVALID_TIME_IN_FORCE: MaxExecutionCost(21009) requires TimeInForce(59)=FOK` |
| `21009` zero or negative | BusinessMessageReject, `Text (58) = INVALID_FIELD_VALUE: MaxExecutionCost(21009) must be positive` |
| Projected cost exceeds the cap | [Rejected](#rejected-358-1508) ExecutionReport: `150=8`, `39=8`, `103=3`, `Text (58) = MAX_EXECUTION_COST_EXCEEDED - insufficient liquidity`. Nothing executes. |

> [!NOTE]
>
> A cap breach is reported as Rejected (`39=8`). An FOK that cannot fill its full quantity is reported as [Expired](#expired-358-150c) (`39=C`). Handle both terminal statuses for FOK orders, and branch on `OrdStatus (39)`, not `Text (58)`.

`MaxExecutionCost (21009)` is not echoed on execution reports.

### Self-match prevention

Self-match prevention stops your orders from trading against each other. There are two independent checks:

* **Firm level:** applies when the aggressing and resting orders have the same firm and the same sub-account, and your firm has a self-match prevention strategy configured. No tags are needed on the order.
* **ID based:** applies when both orders carry the same positive `SelfMatchPreventionId (7928)`. The aggressing order's strategy applies: the `8000` you sent, otherwise the default configured for your user or firm, otherwise `O`.

If `7928` does not equal the ID registered for your user, the order is rejected with `103=99` and `Text (58) = INVALID_FIELD_VALUE`. Omit `7928` to opt out of ID-based prevention for an order.

| SelfMatchPreventionStrategy (8000) | Effect |
| :- | :- |
| `N` = Cancel aggressing | The incoming order is canceled. The resting order stays on the book. |
| `O` = Cancel resting | The resting order is canceled. The incoming order continues matching. |
| `Q` = Cancel both | Both orders are canceled. |

A self-match prevention cancel is reported as [Canceled](#canceled-358-1504) with `378=7` and `Text (58) = SELF_MATCH_PREVENTION`. On an FOK order, a strategy that would cancel the incoming order makes the order expire with `FOK_NOT_FILLED`.

## OrderCancelRequest (35=F)

Cancels the remaining quantity of one open order. Identify the order by `OrderID (37)` or `OrigClOrdID (41)`. You can cancel by `OrigClOrdID` before you receive an ExecutionReport for the order.

| Tag | Name | FIX Type | Req | Description |
| :- | :- | :- | :- | :- |
| 11 | ClOrdID | String | Y | New client ID for this cancel request. Same forms as `ClOrdID` on NewOrderSingle. |
| 41 | OrigClOrdID | String | C | `ClOrdID` of the order to cancel. Required if `OrderID (37)` is absent. |
| 37 | OrderID | String | C | Exchange order ID, echoed from the ExecutionReport. Required if `OrigClOrdID (41)` is absent. Takes precedence when both are sent. |
| 55 | Symbol | String | Y | Instrument ticker. Not used to locate the order. |
| 54 | Side | Char | Y | `1` = Buy. `2` = Sell. Not used to locate the order. |
| 1028 | ManualOrderIndicator | Boolean | Y | CFTC Rule 1.35 audit flag for this cancel. |

A request with neither `37` nor `41` is rejected with BusinessMessageReject, `Text (58) = OrderID(37) or OrigClOrdID(41) required`.

Each accepted request is answered by exactly one of:

* [Canceled](#canceled-358-1504) ExecutionReport (`150=4`). Fills that happened before the cancel took effect are reported first.
* [OrderCancelReject (35=9)](#ordercancelreject-359).

## OrderMassCancelRequest (35=q)

Cancels multiple open orders of your API key. Filters combine with AND.

| Tag | Name | FIX Type | Req | Description |
| :- | :- | :- | :- | :- |
| 11 | ClOrdID | String | Y | Client ID for this request. Same forms as `ClOrdID` on NewOrderSingle. |
| 530 | MassCancelRequestType | Char | Y | `1` = Cancel orders for one instrument (requires `55`). `6` = Cancel orders for the trading session. `7` = Cancel all orders. `6` and `7` behave the same: your API key has one session. Other values are rejected. |
| 55 | Symbol | String | C | Instrument ticker. Required when `530=1`. Ignored otherwise. |
| 54 | Side | Char | N | `1` = Buy only. `2` = Sell only. Omit for both sides. |
| 453 | NoPartyIDs | NumInGroup | N | Optional sub-account filter. |
| → 448 | PartyID | String | N | Sub-account. An empty value applies no filter. |
| → 452 | PartyRole | Int | N | `24` = Customer account. Other roles are ignored. |

Each canceled order is reported with a [Canceled](#canceled-358-1504) ExecutionReport, `Text (58) = USER_MASS_CANCEL`. Then one [OrderMassCancelReport (35=r)](#ordermasscancelreport-35r) summarizes the result. Mass cancel requests are not subject to the session rate throttle.

## ExecutionReport (35=8)

Reports order lifecycle events. `ExecType (150)` identifies the event. Fields common to all execution types:

| Tag | Name | FIX Type | Req | Description |
| :- | :- | :- | :- | :- |
| 11 | ClOrdID | String | Y | Client order ID. On a cancel you requested, the cancel request's `ClOrdID`. |
| 41 | OrigClOrdID | String | N | The order's `ClOrdID`. Sent only on a cancel you requested with OrderCancelRequest. |
| 37 | OrderID | String | Y | Exchange order ID. See [Identifiers](#identifiers). |
| 17 | ExecID | String | Y | Exchange ID of this report. Unique per report. The handle for [F1](/derivatives-predictions/fix/session#lastexecidrequest-35f1) and [F3](/derivatives-predictions/fix/session#eventresendrequest-35f3). |
| 150 | ExecType | Char | Y | `A` = Pending new. `0` = New. `F` = Trade. `4` = Canceled. `C` = Expired. `8` = Rejected. |
| 39 | OrdStatus | Char | Y | `A` = Pending new. `0` = New. `1` = Partially filled. `2` = Filled. `4` = Canceled. `C` = Expired. `8` = Rejected. |
| 55 | Symbol | String | Y | Instrument ticker. `deleted_instrument` when the instrument is no longer available. |
| 54 | Side | Char | Y | `1` = Buy YES. `2` = Sell YES. |
| 38 | OrderQty | Qty | N | Order quantity. |
| 44 | Price | Price | N | Order price. For a market order, the worst admissible price the order was given. |
| 40 | OrdType | Char | N | `1` = Market. `2` = Limit. The type you submitted. |
| 59 | TimeInForce | Char | N | `1` = GTC. `3` = IOC. `4` = FOK. A market order shows `3`. |
| 18 | ExecInst | MultipleCharValue | N | `6` or `A`. Omitted when the order is not post-only. |
| 7928 | SelfMatchPreventionId | Int | N | The ID you sent. Omitted if you sent none. |
| 8000 | SelfMatchPreventionStrategy | Char | N | The strategy that applies to the order: the one you sent, otherwise your user or firm default. Omitted if none is set. Does not report which strategy fired on a match. |
| 1028 | ManualOrderIndicator | Boolean | Y | The order's audit flag. On a cancel, the original order's flag. |
| 880 | TrdMatchID | String | N | Trade match ID. Trade reports only. |
| 1057 | AggressorIndicator | Boolean | N | `Y` = Aggressor (taker). `N` = Passive (maker). Trade reports only. |
| 151 | LeavesQty | Qty | Y | Open quantity remaining. `0` when the order is closed. |
| 14 | CumQty | Qty | Y | Total filled quantity. |
| 6 | AvgPx | Price | N | Average fill price. |
| 32 | LastQty | Qty | N | Quantity of this fill. Trade reports only. |
| 31 | LastPx | Price | N | YES price of this fill. Trade reports only. |
| 136 | NoMiscFees | NumInGroup | N | Fee group, one entry. Trade reports only. |
| → 137 | MiscFeeAmt | Amt | N | Fee in USDC, 6 decimal places. Positive = fee. Negative = rebate. |
| → 138 | MiscFeeCurr | Currency | N | `USDC` |
| → 139 | MiscFeeType | Int | N | `4` = Exchange fees. |
| 60 | TransactTime | UTCTimestamp | Y | Exchange event time, microsecond precision. |
| 378 | ExecRestatementReason | Int | N | Reason for an exchange-initiated cancel. See [Canceled](#canceled-358-1504). |
| 103 | OrdRejReason | Int | N | Rejected reports only. See [OrdRejReason values](#ordrejreason-values). |
| 58 | Text | String | N | Reject or cancel reason label. |
| 453 | NoPartyIDs | NumInGroup | N | Always 5 entries in the order below. A value that cannot be resolved is sent as `unknown`. |
| → 452 | PartyRole | Int | N | `4` = Clearing firm. `1` = Executing firm. `24` = Customer account. `11` = Order origination trader. `55` = Session ID. |
| → 448 | PartyID | String | N | For `452=4`: FCM code. `452=1`: firm code. `452=24`: sub-account. `452=11`: trading user name. `452=55`: API key. |

### Pending New (35=8, 150=A)

Sent when an order is accepted on an instrument with a speed bump. The order is not yet matchable. A further report follows when the delay ends.

| Tag | Name | FIX Type | Req | Description |
| :- | :- | :- | :- | :- |
| 150 | ExecType | Char | Y | `A` = Pending new. |
| 39 | OrdStatus | Char | Y | `A` = Pending new. |
| 151 | LeavesQty | Qty | Y | Order quantity. |
| 14 | CumQty | Qty | Y | `0.00` |
| 6 | AvgPx | Price | N | `0.000` |

### New (35=8, 150=0)

Confirms that an order was accepted.

| Tag | Name | FIX Type | Req | Description |
| :- | :- | :- | :- | :- |
| 150 | ExecType | Char | Y | `0` = New. |
| 39 | OrdStatus | Char | Y | `0` = New. |
| 151 | LeavesQty | Qty | Y | Order quantity. |
| 14 | CumQty | Qty | Y | `0.00` |
| 6 | AvgPx | Price | N | `0.000` |

### Trade (35=8, 150=F)

Reports a fill. Each fill produces one report per side. Fills trade at the resting order's price.

| Tag | Name | FIX Type | Req | Description |
| :- | :- | :- | :- | :- |
| 150 | ExecType | Char | Y | `F` = Trade. |
| 39 | OrdStatus | Char | Y | `1` = Partially filled. `2` = Filled. |
| 32 | LastQty | Qty | N | Always sent. Quantity of this fill. |
| 31 | LastPx | Price | N | Always sent. YES price of this fill. |
| 151 | LeavesQty | Qty | Y | Open quantity after this fill. |
| 14 | CumQty | Qty | Y | Total filled quantity. |
| 6 | AvgPx | Price | N | Always sent. Average fill price. |
| 880 | TrdMatchID | String | N | Always sent. Trade match ID. The same on both sides of the trade. |
| 1057 | AggressorIndicator | Boolean | N | Always sent. `Y` = Aggressor. `N` = Passive. |
| 136 | NoMiscFees | NumInGroup | N | Always sent. `1` |
| → 137 | MiscFeeAmt | Amt | N | Fee in USDC. Negative = rebate. |
| → 138 | MiscFeeCurr | Currency | N | `USDC` |
| → 139 | MiscFeeType | Int | N | `4` = Exchange fees. |

Trade reports are the only reports that [EventResendRequest (35=F3)](/derivatives-predictions/fix/session#eventresendrequest-35f3) can replay.

### Canceled (35=8, 150=4)

Confirms that an order was canceled, at your request or by the exchange.

* **Cancel you requested** with OrderCancelRequest: `ClOrdID (11)` is the cancel request's `ClOrdID`, and `OrigClOrdID (41)` is the order's `ClOrdID`. `378` is not sent.
* **Exchange-initiated cancel** (mass cancel, self-match prevention, instrument status change, cancel on disconnect, or exchange operations): `ClOrdID (11)` is the order's `ClOrdID`. `41` is not sent.

| Tag | Name | FIX Type | Req | Description |
| :- | :- | :- | :- | :- |
| 150 | ExecType | Char | Y | `4` = Canceled. |
| 39 | OrdStatus | Char | Y | `4` = Canceled. |
| 38 | OrderQty | Qty | N | Canceled quantity plus filled quantity. |
| 151 | LeavesQty | Qty | Y | `0.00` |
| 14 | CumQty | Qty | Y | Total filled quantity. |
| 6 | AvgPx | Price | N | `0.000` when the order had no fills. Omitted when it had fills; use `AvgPx` from the last Trade report. |
| 378 | ExecRestatementReason | Int | N | Exchange-initiated cancels only. `7` = Self-match prevention. `2` = Instrument closed, paused, or determined. `1` = Cancel on disconnect. `105` = Canceled by exchange operations. Not sent for mass cancels. |
| 58 | Text | String | N | Always sent. Cancel reason label, for example `USER_REQUEST`, `USER_MASS_CANCEL`, `SELF_MATCH_PREVENTION`, `CLIENT_DISCONNECT`, `ADMIN_CANCEL`, `INSTRUMENT_CLOSED`. |

### Expired (35=8, 150=C)

Sent in two cases:

* **IOC remainder:** the unfilled quantity of an IOC or market order is removed after matching. `Text (58) = TIME_IN_FORCE`. If you cancel such an order yourself, you receive [Canceled](#canceled-358-1504) instead.
* **FOK that cannot fill:** the full quantity is not available, so nothing executes. `Text (58)` starts with `FOK_NOT_FILLED`.

| Tag | Name | FIX Type | Req | Description |
| :- | :- | :- | :- | :- |
| 150 | ExecType | Char | Y | `C` = Expired. |
| 39 | OrdStatus | Char | Y | `C` = Expired. |
| 151 | LeavesQty | Qty | Y | `0.00` |
| 14 | CumQty | Qty | Y | Total filled quantity. Always `0.00` for an FOK. |
| 6 | AvgPx | Price | N | `0.000` when there were no fills. Omitted when an IOC had fills. |
| 58 | Text | String | N | Always sent. `TIME_IN_FORCE`, or `FOK_NOT_FILLED` followed by `-` and a detail. |

`OrdRejReason (103)` is never sent on an Expired report.

### Rejected (35=8, 150=8)

Reports that the exchange rejected an order after accepting the message.

| Tag | Name | FIX Type | Req | Description |
| :- | :- | :- | :- | :- |
| 150 | ExecType | Char | Y | `8` = Rejected. |
| 39 | OrdStatus | Char | Y | `8` = Rejected. |
| 151 | LeavesQty | Qty | Y | `0.00` |
| 14 | CumQty | Qty | Y | `0.00` |
| 6 | AvgPx | Price | N | `0.000` |
| 103 | OrdRejReason | Int | N | Always sent. See [OrdRejReason values](#ordrejreason-values). |
| 58 | Text | String | N | Always sent. Reason label, optionally followed by `-` and a detail. |

### OrdRejReason values

Branch on `OrdStatus (39)` and `OrdRejReason (103)`. `Text (58)` labels are more specific but are for logging and diagnosis. New labels can be added, and a label can move to a different `103` value.

| OrdRejReason (103) | Meaning | Text (58) labels |
| :- | :- | :- |
| `1` | Unknown symbol | `INVALID_INSTRUMENT` |
| `3` | Order exceeds limit | `MAX_ORDER_SIZE_EXCEEDED`, `MAX_ACTIVE_ORDERS_EXCEEDED`, `MAX_EXECUTION_COST_EXCEEDED` |
| `6` | Duplicate order | `DUPLICATE_CLIENT_ORDER_ID` |
| `11` | Unsupported order characteristic | `INVALID_TIME_IN_FORCE`, `POST_ONLY_WOULD_CROSS` |
| `13` | Incorrect quantity | `INVALID_QUANTITY` |
| `15` | Unknown account | `INVALID_SUBACCOUNT` |
| `16` | Price exceeds band | `INVALID_PRICE` |
| `18` | Invalid price increment | `INVALID_PRICE_TICK` |
| `25` | Insufficient credit limit | `INSUFFICIENT_BALANCE` |
| `41` | Exceeded position limit | `POSITION_LIMIT_PER_INSTRUMENT_EXCEEDED` |
| `42` | Invalid client | `INVALID_USER` |
| `43` | Client permission error | `USER_TRADING_LOCKED` |
| `44` | Not allowed by market state | `INSTRUMENT_NOT_ACTIVE` |
| `48` | Reduce only | `REDUCE_ONLY_VIOLATION` |
| `99` | Other | `SELF_MATCH_PREVENTION`, `SPEED_BUMP_QUEUE_FULL`, `INVALID_FIELD_VALUE`, and any label not listed above |

## OrderCancelReject (35=9)

Sent when an [OrderCancelRequest (35=F)](#ordercancelrequest-35f) cannot be applied. Cancel rejects for requests made through other channels are not sent on FIX.

| Tag | Name | FIX Type | Req | Description |
| :- | :- | :- | :- | :- |
| 11 | ClOrdID | String | Y | `ClOrdID` of the cancel request. |
| 41 | OrigClOrdID | String | N | `OrigClOrdID` of the cancel request. Omitted when the request identified the order by `OrderID` only. |
| 37 | OrderID | String | N | Exchange order ID. `0` when the order is unknown. |
| 39 | OrdStatus | Char | Y | `U` = Undefined. The reject carries no order state. |
| 102 | CxlRejReason | Int | N | `1` = Unknown order. `0` = Too late to cancel (order already filled). `3` = Cancel already pending for this order. |
| 434 | CxlRejResponseTo | Char | Y | `1` = Order cancel request. |
| 58 | Text | String | N | Always sent: `UNKNOWN_ORDER`, `ORDER_ALREADY_FILLED`, or `CANCEL_ALREADY_PENDING`. |

`102=1` (`Text` `UNKNOWN_ORDER`) covers an order that never existed, an order that is already canceled or expired, and an order that belongs to another user. To tell them apart, check the ExecutionReports you received for that `ClOrdID`. A fully filled order gets `102=0` with `Text` `ORDER_ALREADY_FILLED`.

## OrderMassCancelReport (35=r)

Summarizes an [OrderMassCancelRequest (35=q)](#ordermasscancelrequest-35q). It is sent after the individual Canceled reports.

| Tag | Name | FIX Type | Req | Description |
| :- | :- | :- | :- | :- |
| 11 | ClOrdID | String | Y | `ClOrdID` of the mass cancel request. |
| 1369 | MassActionReportID | String | Y | Exchange report ID, in the same number space as `ExecID`. `0` when the request was rejected on receipt. |
| 530 | MassCancelRequestType | Char | Y | Echoes the type you sent. |
| 531 | MassCancelResponse | Char | Y | `7` = Accepted. `0` = Rejected. No other value is sent. |
| 532 | MassCancelRejectReason | Int | N | Sent when `531=0`. `0` = Mass cancel type not supported. `1` = Invalid or unknown instrument (missing or unknown `55` with `530=1`). `99` = Other. |
| 533 | TotalAffectedOrders | Int | N | Number of orders canceled. `0` on a reject. |
| 60 | TransactTime | UTCTimestamp | Y | Event time, microsecond precision. |
| 58 | Text | String | N | Reject reason. Rejects only. |

`531=7` does not report the scope that ran. Use `TotalAffectedOrders (533)` to see how many orders were canceled.

## MarketSettlementReport (35=UMS)

Sent when an instrument settles, once per firm and instrument. You receive it only if you sent `ReceiveSettlementReports (20127) = Y` on [Logon (35=A)](/derivatives-predictions/fix/session#logon-35a). Every connected session of the firm that opted in receives the same report.

| Tag | Name | FIX Type | Req | Description |
| :- | :- | :- | :- | :- |
| 20105 | MarketSettlementReportID | String | Y | Report ID, in the same number space as `ExecID`. |
| 55 | Symbol | String | Y | Settled instrument ticker. |
| 453 | NoPartyIDs | NumInGroup | Y | `2` |
| → 448 | PartyID | String | Y | FCM code, then firm code. |
| → 452 | PartyRole | Int | Y | `4` = Clearing firm, then `1` = Executing firm. |
| 21052 | SettlementOutcome | Char | Y | `Y` = YES wins (price `1.000`). `N` = NO wins (price `0.000`). `S` = Scalar (price between). |
| 730 | SettlementPrice | Price | Y | Settlement price, 3 decimal places. |
| 21053 | PositionAggregationMode | Char | Y | Firm's position mode. `N` = Net. `G` = Gross. |
| 21054 | LongQty | Qty | Y | Long contracts held just before settlement. |
| 21055 | ShortQty | Qty | Y | Short contracts held just before settlement. |
| 21056 | PayoutAmount | Amt | Y | Gross payout in USDC: `SettlementPrice × LongQty + (1.000 − SettlementPrice) × ShortQty`. Not profit or loss. Never negative. |
| 60 | TransactTime | UTCTimestamp | Y | Settlement time, microsecond precision. |

* With `21053=N`, at most one of `LongQty` and `ShortQty` is non-zero. With `21053=G`, both can be non-zero.
* Settlement is reported per firm, not per sub-account.

## BusinessMessageReject (35=j)

Sent when an application message is rejected before it reaches the exchange. No ExecutionReport follows.

| Tag | Name | FIX Type | Req | Description |
| :- | :- | :- | :- | :- |
| 45 | RefSeqNum | SeqNum | N | `MsgSeqNum (34)` of the rejected message. |
| 372 | RefMsgType | String | Y | `MsgType (35)` of the rejected message. |
| 379 | BusinessRejectRefID | String | N | `ClOrdID (11)` of the rejected message, or the invalid value when an identifier field fails validation. |
| 380 | BusinessRejectReason | Int | Y | `0` = Other. Sent for every BusinessMessageReject. |
| 58 | Text | String | N | Reason. See the table below. |

| Condition | Text (58) |
| :- | :- |
| Missing required tag, invalid value, or other dictionary validation failure | `sessionRejectReason=` followed by the FIX session reject reason code, and `tag=` with the tag number when known |
| `ClOrdID`, `OrigClOrdID`, or sub-account in an invalid format | `invalid ClientOrderId` or `invalid PartyID`, or a message stating the accepted lengths |
| Unknown ticker on NewOrderSingle | `unknown Symbol` |
| Order type, price, post-only, sub-account, or trading lock rules | See [Order type and price rules](#order-type-and-price-rules) |
| Executing firm rules | See [Executing firm](#executing-firm) |
| MaxExecutionCost rules | See [Max execution cost](#max-execution-cost) |
| Your API key no longer has `TRADE` permission, or its scope no longer resolves (NewOrderSingle and EventResendRequest) | `authenticated principal lacks TRADE permission` or `authenticated principal scope is unavailable` |
| OrderCancelRequest without `37` or `41` | `OrderID(37) or OrigClOrdID(41) required` |
| Session message rate exceeded (cancels and mass cancels are exempt) | `session rate throttle` |
| Unsupported `MsgType (35)` | `unsupported message type` |

## Values specific to Coinbase Derivatives: Predictions

The gateway uses standard FIX 5.0 SP2 tags where they exist. The following messages and tags are specific to Coinbase Derivatives: Predictions.

| Tag or message | Name | Description |
| :- | :- | :- |
| `35=UMS` | MarketSettlementReport | See [MarketSettlementReport (35=UMS)](#marketsettlementreport-35ums). |
| `35=F1` to `35=F5` | Event resend messages | See [LastExecIDRequest (35=F1)](/derivatives-predictions/fix/session#lastexecidrequest-35f1) through [EventResendReject (35=F5)](/derivatives-predictions/fix/session#eventresendreject-35f5). |
| 8013 | CancelOrdersOnDisconnect | Logon. See [Cancel on disconnect](/derivatives-predictions/fix/session#cancel-on-disconnect). |
| 20127 | ReceiveSettlementReports | [Logon](/derivatives-predictions/fix/session#logon-35a). Opts in to MarketSettlementReport. |
| 21009 | MaxExecutionCost | NewOrderSingle. See [Max execution cost](#max-execution-cost). |
| 7928, 8000 | SelfMatchPreventionId, SelfMatchPreventionStrategy | See [Self-match prevention](#self-match-prevention). |
| 20105, 21052 to 21056 | Settlement fields | See [MarketSettlementReport (35=UMS)](#marketsettlementreport-35ums). |
| 22003 to 22006 | Event resend fields | See [EventResendRequest (35=F3)](/derivatives-predictions/fix/session#eventresendrequest-35f3). |
