---
title: "Order entry"
url: https://docs.truemarkets.co/api/fix/order-entry
description: "Place, amend and cancel orders over the CeFi FIX order-entry session, and the reports the exchange sends back."
---

Docs index: https://docs.truemarkets.co/llms.txt

# Order entry

Place, amend and cancel orders over the order entry session. The exchange reports every change to your order back to you.

**Messages you send**

- `NewOrderSingle` (35=D): place a new order
- `OrderCancelRequest` (35=F): cancel a working order
- `OrderCancelReplaceRequest` (35=G): amend a working order (qty, price, or convert to market)

**Messages the exchange sends**

- `ExecutionReport` (35=8): every order state change and fill
- `OrderCancelReject` (35=9): a cancel or replace that couldn't be applied

## Conventions

These conventions apply to every order-entry message, and the tables below reference them.

### ClOrdID format

`ClOrdID` (11) and `OrigClOrdID` (41) are client-assigned IDs. Each must be one of:

- A **UUID v4** in human-readable form (lowercase, with hyphens); or
- An **ASCII string up to 18 characters**, using only unreserved URL characters: letters (`a–z`, `A–Z`), digits (`0–9`), hyphen (`-`), underscore (`_`), period (`.`), and tilde (`~`).

### Parties

Every order-entry message carries exactly **one** party group:

| TAG  | NAME       | TYPE   | REQ | DESCRIPTION                                                                                              |
| ---- | ---------- | ------ | --- | -------------------------------------------------------------------------------------------------------- |
| 453  | NoPartyIDs | int    | Y   | Number of party entries. Must equal `1` (one party per request) and be the first entry before the group. |
| ↳448 | PartyID    | string | Y   | Your party identifier/code.                                                                              |
| ↳452 | PartyRole  | int    | Y   | Role of the PartyID: - `3`: Client ID                                                                    |

## Messages you send

### NewOrderSingle (35=D)

Place a new order.

| TAG  | NAME                    | TYPE       | REQ | DESCRIPTION                                                                                                                                                                                                                                                         |
| ---- | ----------------------- | ---------- | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 11   | ClOrdID                 | string     | Y   | Client order ID for this request (see [ClOrdID format](#clordid-format)).                                                                                                                                                                                           |
| 18   | ExecInst                | string     | N   | Execution instructions, space-separated: - `6`: Add Liquidity Only (ALO): the order is accepted only if it doesn't match against any resting order. - `G`: All Or None (AON): the order fills in full or not at all. Available only where enabled for your account. |
| 38   | OrderQty                | decimal128 | Y   | Quantity requested, in units of the base asset.                                                                                                                                                                                                                     |
| 40   | OrdType                 | char       | Y   | Order type: - `1`: Market - `2`: Limit Market orders are automatically converted to aggressively priced limit orders.                                                                                                                                               |
| 44   | Price                   | decimal128 | C   | Max price for a buy / min price for a sell. Must meet the market's minimum price variation (MPV) or it's rejected. Send it on every order: a NewOrderSingle without a valid Price is rejected, and for a market order it does not limit the fill.                   |
| 54   | Side                    | char       | Y   | Side: - `1`: Buy - `2`: Sell                                                                                                                                                                                                                                        |
| 55   | Symbol                  | string     | Y   | Ticker symbol (e.g. `BTC/USDC`).                                                                                                                                                                                                                                    |
| 59   | TimeInForce             | char       | N   | How long the order stays in effect. Defaults to GTC if omitted: - `1`: Good Till Cancel (GTC). The exchange may expire long-lived GTC orders under its risk controls. - `3`: Immediate Or Cancel (IOC)                                                              |
| 2964 | SelfMatchPreventionInst | int        | N   | How to handle self-matches (orders that would trade with the same Client ID). Can't be changed after entry: - `1`: Cancel Aggressor - `3`: Cancel Both                                                                                                              |

Plus the [party group](#parties) (453 / 448 / 452).

### OrderCancelRequest (35=F)

Cancel a working order.

| TAG | NAME        | TYPE   | REQ | DESCRIPTION                                                                    |
| --- | ----------- | ------ | --- | ------------------------------------------------------------------------------ |
| 11  | ClOrdID     | string | Y   | ID for this cancel request (see [ClOrdID format](#clordid-format)).            |
| 41  | OrigClOrdID | string | Y   | `ClOrdID` of the order being canceled (see [ClOrdID format](#clordid-format)). |

Plus the [party group](#parties) (453 / 448 / 452).

There is no FIX mass cancel. To cancel every open order, use [`DELETE /v1/cefi/orders/all`](https://docs.truemarkets.co/api/institutional/cancel-all-orders-cefi) over REST.

### OrderCancelReplaceRequest (35=G)

Amend a working order: change quantity or price, or convert a limit order to market.

| TAG | NAME        | TYPE       | REQ | DESCRIPTION                                                                                                                                |
| --- | ----------- | ---------- | --- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| 11  | ClOrdID     | string     | Y   | ID for this replace request (see [ClOrdID format](#clordid-format)).                                                                       |
| 38  | OrderQty    | decimal128 | N   | New quantity, in units of the base asset.                                                                                                  |
| 40  | OrdType     | char       | N   | Only used to convert a Limit order to Market: - `1`: Market Do not send `40=2`. Omit to leave the order type unchanged.                    |
| 41  | OrigClOrdID | string     | Y   | `ClOrdID` of the order being replaced (see [ClOrdID format](#clordid-format)).                                                             |
| 44  | Price       | decimal128 | C   | New limit price (in the quote asset). Must meet the market's MPV or it's rejected. Required when `OrdType = 2` (Limit); ignored otherwise. |

Plus the [party group](#parties) (453 / 448 / 452).

## Messages the exchange sends

### ExecutionReport (35=8)

The exchange's response for every order state change and fill. Fields marked "on Trade" are set when `ExecType (150) = F`.

| TAG  | NAME                    | TYPE          | REQ | DESCRIPTION                                                                                                                                                                                                            |
| ---- | ----------------------- | ------------- | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 11   | ClOrdID                 | string        | Y   | ID of the order being reported (from your request).                                                                                                                                                                    |
| 37   | OrderID                 | string        | Y   | Exchange-assigned order identifier.                                                                                                                                                                                    |
| 17   | ExecID                  | string        | Y   | Exchange-assigned identifier for this execution message.                                                                                                                                                               |
| 150  | ExecType                | char          | Y   | What this report describes: - `0`: New - `4`: Canceled - `5`: Replaced - `6`: Pending Cancel - `8`: Rejected - `A`: Pending New - `C`: Expired - `E`: Pending Replace - `F`: Trade                                     |
| 39   | OrdStatus               | char          | Y   | Current order status: - `0`: New - `1`: Partially Filled - `2`: Filled - `4`: Canceled - `5`: Replaced - `6`: Pending Cancel - `8`: Rejected - `9`: Suspended - `A`: Pending New - `E`: Pending Replace - `C`: Expired |
| 40   | OrdType                 | char          | Y   | Order type: - `1`: Market - `2`: Limit                                                                                                                                                                                 |
| 54   | Side                    | char          | Y   | Side: - `1`: Buy - `2`: Sell                                                                                                                                                                                           |
| 55   | Symbol                  | string        | Y   | Ticker symbol.                                                                                                                                                                                                         |
| 59   | TimeInForce             | char          | Y   | - `1`: Good Till Cancel (GTC) - `3`: Immediate Or Cancel (IOC)                                                                                                                                                         |
| 38   | OrderQty                | decimal128    | C   | Quantity requested. Always present on accepted reports; on a NewOrderSingle reject, only if the request set it.                                                                                                        |
| 44   | Price                   | decimal128    | C   | Limit price (market orders report the internally stored price). Always present on accepted reports; on a NewOrderSingle reject, only if the request set it.                                                            |
| 14   | CumQty                  | decimal128    | Y   | Total quantity filled on this order.                                                                                                                                                                                   |
| 151  | LeavesQty               | decimal128    | Y   | Quantity still open for execution.                                                                                                                                                                                     |
| 6    | AvgPx                   | decimal128    | C   | On Trade: average price of all fills on this order.                                                                                                                                                                    |
| 31   | LastPx                  | decimal128    | C   | On Trade: price of this (last) trade.                                                                                                                                                                                  |
| 32   | LastQty                 | decimal128    | C   | On Trade: quantity of this (last) trade.                                                                                                                                                                               |
| 851  | LastLiquidityInd        | int           | C   | On Trade: whether this execution added or removed liquidity: - `1`: Added (including Setter fills, see the Rulebook section 2.14.2) - `2`: Removed - `4`: Unknown                                                      |
| 880  | TrdMatchID              | string        | C   | On Trade: exchange-assigned identifier for the match.                                                                                                                                                                  |
| 15   | Currency                | string        | N   | Currency used for prices, fees, and commissions in this report.                                                                                                                                                        |
| 18   | ExecInst                | string        | C   | Execution instructions, when present on the order.                                                                                                                                                                     |
| 41   | OrigClOrdID             | string        | C   | `ClOrdID` of the previous order, on cancel/replace reports.                                                                                                                                                            |
| 58   | Text                    | string        | C   | Human-readable reason. Set on `ExecType = 8` (Rejected) with the reason, and on `ExecType = 4` (Canceled) if the engine reports one.                                                                                   |
| 60   | TransactTime            | utc timestamp | Y   | When the report was generated.                                                                                                                                                                                         |
| 2964 | SelfMatchPreventionInst | int           | C   | Present when self-match prevention was set on the order: - `1`: Cancel Aggressor - `3`: Cancel Both                                                                                                                    |

**Misc fees group**, on Trade (`ExecType = F`):

| TAG  | NAME        | TYPE       | REQ | DESCRIPTION                    |
| ---- | ----------- | ---------- | --- | ------------------------------ |
| 136  | NoMiscFees  | int        | C   | Number of fee entries.         |
| ↳137 | MiscFeeAmt  | decimal128 | C   | Fee amount for this execution. |
| ↳139 | MiscFeeType | string     | C   | Fee type: - `4`: Exchange Fees |

Plus the [party group](#parties) (453 / 448 / 452).

### OrderCancelReject (35=9)

Sent when a cancel or replace can't be applied.

| TAG | NAME             | TYPE   | REQ | DESCRIPTION                                                                           |
| --- | ---------------- | ------ | --- | ------------------------------------------------------------------------------------- |
| 11  | ClOrdID          | string | Y   | ID of the cancel/replace request (see [ClOrdID format](#clordid-format)).             |
| 41  | OrigClOrdID      | string | Y   | `ClOrdID` of the order the request targeted (see [ClOrdID format](#clordid-format)).  |
| 37  | OrderID          | string | Y   | Exchange-assigned order identifier.                                                   |
| 39  | OrdStatus        | char   | Y   | Current status of the targeted order (same values as `OrdStatus` on ExecutionReport). |
| 434 | CxlRejResponseTo | char   | Y   | What the reject responds to: - `1`: Cancel Request - `2`: Cancel/Replace Request      |
| 102 | CxlRejReason     | int    | C   | Reason code for common cases: - `0`: Too late to cancel - `1`: Unknown order          |
| 58  | Text             | string | C   | Human-readable reason the request was rejected.                                       |

Next: [Drop copy](https://docs.truemarkets.co/api/fix/drop-copy), the read-only stream of the same execution reports for compliance.