Skip to main content

Amending an existing order

Cross-Session Amending: Orders can be amended from a different SBE session than the one that submitted them. For example, an order submitted on session A can be amended on session B.Response Routing: AmendOrderResponse is sent to both the session that sent the AmendOrderRequest and the session that originally submitted the order. All subsequent events (fills, further amends, cancels) route to the original submit session.Event Scoping: An SBE connection only receives events about orders submitted through that same connection.

AmendOrderRequest (110)

Request to change the modifiable fields of an existing order.
Null values: Some optional fields use NULL_LONG / NULL_QUANTITY (0x8000000000000000L) as a sentinel to indicate “not set”. For example, set displayAmount = NULL_QUANTITY to keep the order non-iceberg.
FieldNameTypeLengthDescription
1clientOrderIdint648Numeric client order ID
2correlationIdint648Client-assigned ID
3instrumentIdint648Numeric instrument ID
4limitPricePrice98New price
5quantityDecimal729New quantity
6showQtyDecimal729New visible amount for iceberg orders. Setting this field to any value (including equal to amount) marks the order as an iceberg order. To submit a non-iceberg order, omit this field or set it to NULL_QUANTITY. Iceberg orders are not supported for options and combo instruments.
7flagsuint162See the table below.
The table below outlines the content of field 7 (flags) of AmendOrderRequest.
Bit number (from last to first)NameDescription
1postOnlyEnables post-only that amends the order to the best bid/ask if the edit would make it immediately executable. The amended price is then validated against price limits. Mutually exclusive with postOnlyReject.
2postOnlyRejectEnables post-only that rejects the edit if it would make the order immediately executable. The original order remains in the book unchanged. Mutually exclusive with postOnly .
3Reserved for future use
4Reserved for future use
5Reserved for future use
6Reserved for future use
7Reserved for future use
8Reserved for future use
9-16Reserved for future use

AmendOrderResponse (210)

Response to confirm an AmendOrderRequest was successful, sent from the exchange to the client. Any immediate fills generated by the AmendOrderRequest will be included in the AmendOrderResponse and will NOT be sent additionally in an OrderUpdate. If the amendment causes the order to aggress and it is speed bumped, the AmendOrderResponse is sent immediately with orderState = 4 (queued). Once the speed bump period expires, an unsolicited OrderPlaced message is sent. See Speed Bumps for details.
FieldNameTypeLengthDescription
1transactTimeint648Nanoseconds since epoch. Time of entry into the order book
2execIdint648Exchange-assigned event ID
3clientOrderIdint648Numeric client order ID
4correlationIdint648Client-assigned ID
5orderIdint648Numeric exchange assigned order ID
6instrumentIdint648Numeric instrument ID
7limitPricePrice98Price. Can differ from submitted price when post-only (amend) is enabled
8quantityDecimal729Quantity. Can differ from submitted quantity when reduce-only is enabled
9totalFilledDecimal729Filled quantity
10visibleQtyDecimal729Currently visible in market data
9totalFilledDecimal729Filled quantity
10visibleQtyDecimal729Currently visible in market data
11receiveTimeint648Nanoseconds since epoch. Time of receipt of order on the gateway.
12statusint811=Active
2=filled
3=cancelled
4=queued (speed bumped)
13cancelReasonint81See Order Response Cancel Reasons
14blockLengthOfFillsuint16224 (bytes)
15numberOfFillsuint162Indicates the length of the following repeating group containing all immediate fills when the order was submitted
->16matchIdint648Transaction ID representing match, shared by all fills within match
->17fillPricePrice98Price of fill
->18fillQtyDecimal729Quantity of fill
19blockLengthOfLegsuint16233 (bytes)
20numberOfLegsuint162Indicates the length of the following repeating group containing all combo leg quantities and prices.
Non-zero for trades on combo instruments only.
->21matchIdint648Transaction ID representing match.
->22instrumentIdint648Numeric instrument ID.
->23legPricePrice98Price98Price of this leg in the combo instrumentPrice of this leg in the combo instrument
->24legQtyDecimal729Quantity of this leg in the combo instrument
->25legSideint811=BUY
-1=SELL

AmendOrderReject (212)

Reject generated in case an AmendOrderRequest is unsuccessful.
FieldNameTypeLengthDescription
1transactTimeint648Nanoseconds since epoch. Time of entry into the order book
2execIdint648Exchange-assigned event ID
3clientOrderIdint648Numeric client order ID
4correlationIdint648Client-assigned ID
5orderIdint648Numeric exchange assigned order ID
6instrumentIdint648Numeric instrument ID
7reasonint81Rejection reason code. See Rejection Reason Codes for possible values.
8detailschar0-255ASCII-encoded string