Placing a new order
Fill Limits: The maximum number of fills on a single order is 2000 fills for single-leg instruments and 400 fills for combo instruments.
NewOrderRequest (100)
Request to place a new order sent by the client. The order will belong to the portfolio with which the connection was authenticated. Will be followed by aNewOrderResponse in case the order placement is successful or by a NewOrderReject in case the order placement is unsuccessful. Any immediate fills will be added to the NewOrderResponse and will NOT be sent in an OrderFilled. Any consecutive unsolicited change to the order (including fills) will be sent in an OrderFilled.
| Field | Name | Type | Length | Description |
|---|---|---|---|---|
| 1 | clientOrderId | int64 | 8 | Numeric client order ID |
| 2 | correlationId | int64 | 8 | Client-assigned ID |
| 3 | instrumentId | int64 | 8 | Numeric instrument ID |
| 4 | limitPrice | FixedPoint9 | 8 | Limit price, or 0x8000000000000000L for market orders. |
| 5 | amount | Decimal72 | 9 | Amount |
| 6 | displayAmount | Decimal72 | 9 | Amount with ? decimal places. If displayAmount=amount, the order is not considered an iceberg order. |
| 7 | SMPToken | int64 | 8 | This order cannot match with any other orders within the same portfolio with the same token. |
| 8 | side | int8 | 1 | 1=BUY-1=SELL |
| 9 | timeInForce | int8 | 1 | -2=Immediate-or-cancel-1=Fill-or-kill0=Good-til-cancelAny number >0 will be the number of days the order will be alive, such that an order with 1 will be cancelled at the next settlement. |
| 10 | flags | uint8 | 1 | See the table below. |
| 11 | smpMode | int8 | 1 | 0=CancelTaker1=CancelMaker |
NewOrderRequest.
| Bit number (from last to first) | Name | Description |
|---|---|---|
| 1 | Post-only (amend) | Enables post-only that amends the order price to the best bid/ask if it would be immediately executable. The amended price is then validated against price limits. Mutually exclusive with Post-only (reject) |
| 2 | Post-only (reject) | Enables post-only that rejects the order if it would be immediately executable. Mutually exclusive with Post-only (amend) |
| 3 | Reduce-only | This order will be amended at entry and at later times to ensure it can only fully or partially close an open position |
| 4 | MMP | The order will be subject to the default Market Maker Protection group |
| 5 | resetMmp | Unfreeze orders MMP group |
| 6 | marketLimit | Set limitPrice based on top-of-book instead of price band |
| 7 | Reserved for future use | |
| 8 | Reserved for future use |
NewOrderResponse (200)
Response to confirm aNewOrderRequest was successful, sent from the exchange to the client. Any immediate fills generated by the NewOrderRequest will be included in the NewOrderResponse and will NOT be sent additionally in an OrderFilled.
| Field | Name | Type | Length | Description |
|---|---|---|---|---|
| 1 | transactTime | int64 | 8 | Nanoseconds since epoch. Time of entry into the order book |
| 2 | execId | int64 | 8 | Exchange-assigned event ID |
| 3 | clientOrderId | int64 | 8 | Numeric client order ID |
| 4 | correlationId | int64 | 8 | Client-assigned ID |
| 5 | orderId | int64 | 8 | Numeric exchange assigned order ID |
| 6 | instrumentId | int64 | 8 | Numeric instrument ID |
| 7 | receiveTime | int64 | 8 | Nanoseconds since epoch. Time of receipt of order on the gateway. |
| 8 | limitPrice | FixedPoint9 | 8 | Price. Can differ from submitted price when post-only (amend) is enabled |
| 9 | amount | Decimal72 | 9 | Decimal floating point amount. Can differ from submitted amount when reduce-only is enabled |
| 10 | filledAmount | Decimal72 | 9 | Filled amount |
| 11 | visibleAmount | Decimal72 | 9 | For iceberg orders this is the visible amount in the book. For non-icebergs this is the remaining amount (amount - filledAmount). |
| 12 | side | int8 | 1 | 1=BUY-1=SELL |
| 13 | orderState | int8 | 1 | 1=Active2=filled3=cancelled4=queued (speed bumped) |
| 14 | cancelReason | int8 | 1 | See Order Response Cancel Reasons |
| 15 | blockLengthOfFills | uint16 | 2 | 25 (bytes) |
| 16 | numberOfFills | uint16 | 2 | Indicates the length of the following repeating group containing all immediate fills when the order was submitted |
| ->17 | matchId | int64 | 8 | Transaction ID representing match. |
| ->18 | fillPrice | FixedPoint9 | 8 | Price of fill |
| ->19 | fillAmount | Decimal72 | 9 | Amount of fill |
| 20 | blockLengthOfLegs | uint16 | 2 | 34 (bytes) |
| 21 | numberOfLegs | uint16 | 2 | Indicates the length of the following repeating group containing all combo leg quantities and prices. Non-zero for trades on combo instruments only. |
| ->22 | matchId | int64 | 8 | Transaction ID representing match. |
| ->23 | instrumentId | int64 | 8 | Numeric instrument ID |
| ->24 | legPrice | FixedPoint9 | 8 | Price of this leg in the combo instrument |
| ->25 | legQty | Decimal72 | 9 | Quantity of this leg in the combo instrument |
| ->26 | legSide | int8 | 1 | 1=BUY-1=SELL |
NewOrderReject (202)
Reject generated in case aNewOrderRequest is unsuccessful.
| Field | Name | Type | Length | Description |
|---|---|---|---|---|
| 1 | transactTime | int64 | 8 | Nanoseconds since epoch. Time of entry into the order book |
| 2 | clientOrderId | int64 | 8 | Numeric client order ID |
| 3 | correlationId | int64 | 8 | Client-assigned ID |
| 4 | orderId | int64 | 8 | Numeric exchange assigned order ID |
| 5 | instrumentId | int64 | 8 | Numeric instrument ID |
| 6 | reason | int8 | 1 | Rejection reason code. See Rejection Reason Codes for possible values. |
| 7 | detailsLength | uint8 | 1 | Length of details field |
| 8 | details | char | 0-255 | ASCII-encoded string |