Skip to main content

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:

TAGNAMETYPEREQDESCRIPTION
453NoPartyIDsintYNumber of party entries. Must equal 1 (one party per request) and be the first entry before the group.
↳448PartyIDstringYYour party identifier/code.
↳452PartyRoleintYRole of the PartyID:
  • 3: Client ID

Messages you send​

NewOrderSingle (35=D)​

Place a new order.

TAGNAMETYPEREQDESCRIPTION
11ClOrdIDstringYClient order ID for this request (see ClOrdID format).
18ExecInststringNExecution 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.
38OrderQtydecimal128YQuantity requested, in units of the base asset.
40OrdTypecharYOrder type:
  • 1: Market
  • 2: Limit
Market orders are automatically converted to aggressively priced limit orders.
44Pricedecimal128CMax 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.
54SidecharYSide:
  • 1: Buy
  • 2: Sell
55SymbolstringYTicker symbol (e.g. BTC/USDC).
59TimeInForcecharNHow 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)
2964SelfMatchPreventionInstintNHow 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 (453 / 448 / 452).

OrderCancelRequest (35=F)​

Cancel a working order.

TAGNAMETYPEREQDESCRIPTION
11ClOrdIDstringYID for this cancel request (see ClOrdID format).
41OrigClOrdIDstringYClOrdID of the order being canceled (see ClOrdID format).

Plus the party group (453 / 448 / 452).

There is no FIX mass cancel. To cancel every open order, use DELETE /v1/cefi/orders/all over REST.

OrderCancelReplaceRequest (35=G)​

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

TAGNAMETYPEREQDESCRIPTION
11ClOrdIDstringYID for this replace request (see ClOrdID format).
38OrderQtydecimal128NNew quantity, in units of the base asset.
40OrdTypecharNOnly used to convert a Limit order to Market:
  • 1: Market
Do not send 40=2. Omit to leave the order type unchanged.
41OrigClOrdIDstringYClOrdID of the order being replaced (see ClOrdID format).
44Pricedecimal128CNew 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 (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.

TAGNAMETYPEREQDESCRIPTION
11ClOrdIDstringYID of the order being reported (from your request).
37OrderIDstringYExchange-assigned order identifier.
17ExecIDstringYExchange-assigned identifier for this execution message.
150ExecTypecharYWhat this report describes:
  • 0: New
  • 4: Canceled
  • 5: Replaced
  • 6: Pending Cancel
  • 8: Rejected
  • A: Pending New
  • C: Expired
  • E: Pending Replace
  • F: Trade
39OrdStatuscharYCurrent 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
40OrdTypecharYOrder type:
  • 1: Market
  • 2: Limit
54SidecharYSide:
  • 1: Buy
  • 2: Sell
55SymbolstringYTicker symbol.
59TimeInForcecharY
  • 1: Good Till Cancel (GTC)
  • 3: Immediate Or Cancel (IOC)
38OrderQtydecimal128CQuantity requested. Always present on accepted reports; on a NewOrderSingle reject, only if the request set it.
44Pricedecimal128CLimit price (market orders report the internally stored price). Always present on accepted reports; on a NewOrderSingle reject, only if the request set it.
14CumQtydecimal128YTotal quantity filled on this order.
151LeavesQtydecimal128YQuantity still open for execution.
6AvgPxdecimal128COn Trade: average price of all fills on this order.
31LastPxdecimal128COn Trade: price of this (last) trade.
32LastQtydecimal128COn Trade: quantity of this (last) trade.
851LastLiquidityIndintCOn Trade: whether this execution added or removed liquidity:
  • 1: Added
  • 2: Removed
  • 4: Unknown
880TrdMatchIDstringCOn Trade: exchange-assigned identifier for the match.
15CurrencystringNCurrency used for prices, fees, and commissions in this report.
18ExecInststringCExecution instructions, when present on the order.
41OrigClOrdIDstringCClOrdID of the previous order, on cancel/replace reports.
58TextstringCHuman-readable reason. Set on ExecType = 8 (Rejected) with the reason, and on ExecType = 4 (Canceled) if the engine reports one.
60TransactTimeutc timestampYWhen the report was generated.
2964SelfMatchPreventionInstintCPresent when self-match prevention was set on the order:
  • 1: Cancel Aggressor
  • 3: Cancel Both

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

TAGNAMETYPEREQDESCRIPTION
136NoMiscFeesintCNumber of fee entries.
↳137MiscFeeAmtdecimal128CFee amount for this execution.
↳139MiscFeeTypestringCFee type:
  • 4: Exchange Fees

Plus the party group (453 / 448 / 452).

OrderCancelReject (35=9)​

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

TAGNAMETYPEREQDESCRIPTION
11ClOrdIDstringYID of the cancel/replace request (see ClOrdID format).
41OrigClOrdIDstringYClOrdID of the order the request targeted (see ClOrdID format).
37OrderIDstringYExchange-assigned order identifier.
39OrdStatuscharYCurrent status of the targeted order (same values as OrdStatus on ExecutionReport).
434CxlRejResponseTocharYWhat the reject responds to:
  • 1: Cancel Request
  • 2: Cancel/Replace Request
102CxlRejReasonintCReason code for common cases:
  • 0: Too late to cancel
  • 1: Unknown order
58TextstringCHuman-readable reason the request was rejected.

Next: Drop copy, the read-only stream of the same execution reports for compliance.