developers:fixapi:cancelreplacerequest

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
developers:fixapi:cancelreplacerequest [2025/09/12 01:34] – removed - external edit (Unknown date) 127.0.0.1developers:fixapi:cancelreplacerequest [2025/09/12 02:04] (current) chad
Line 1: Line 1:
 +====== ORDER CANCEL/REPLACE REQUEST [35=G] ======
  
 +The Order Cancel/Replace Request message amends replaceable fields of working orders. This message supports all strategy types including futures, options, spreads, and multileg strategies.
 +
 +===== Prerequisites =====
 +  * Account must be subscribed before order submission
 +  * Working order must be identified by OrigClOrdID (41) and/or OrderID (37)
 +  * New unique ClOrdID required (12-20 characters)
 +
 +===== Replaceable Fields =====
 +
 +^ Field ^ Tag ^ Applicable Order Types ^
 +| OrderQty | 38 | All orders |
 +| Price | 44 | Limit, Stop Limit, Market If Touched |
 +| StopPx | 99 | Stop, Stop Limit |
 +| MaxShow | 210 | Iceberg (if exchange supported) |
 +| TrailingDelta | 10100 | Trailing Stop |
 +| ActivationValue | 10103 | Activation orders |
 +
 +===== Special Operations =====
 +
 +**Queue Order Activation:**
 +  * Set ActivationType (10102) = -1 to activate held/suspended orders
 +
 +**Order Identification:**
 +  * **API-submitted orders:** Use OrigClOrdID (41) of target order
 +  * **Frontend-submitted orders:** Use OrderID (37) and set OrigClOrdID = OrderID
 +  * **Recommended:** Always specify both OrigClOrdID and OrderID
 +
 +===== Message Specification =====
 +
 +**Message Direction:** Client → T4
 +
 +^ Tag ^ Field Name ^ Type ^ Req'd ^ Description ^
 +| | **Message Header** | | Y | MsgType = G |
 +| 1 | Account | String | Y | Account code |
 +| 11 | ClOrdID | String | Y | New unique ID for this replace (12-20 chars) |
 +| 41 | OrigClOrdID | String | Y | Original ClOrdID of target order |
 +| 37 | OrderID | String | Y | T4-generated ID of target order |
 +| 48 | SecurityID | String | Y | T4 Market ID |
 +| 55 | Symbol | String | Y | T4 Contract ID |
 +| 207 | SecurityExchange | String | Y | T4 Exchange ID |
 +| 167 | SecurityType | String | Y | FUT, OPT, STK, SYN, BIN |
 +| 201 | PutOrCall | Int | C | Options only. 0=Put, 1=Call |
 +| 202 | StrikePrice | Float | C | Options only. Strike price |
 +| 54 | Side | Char | Y | 0=None, 1=Buy, 2=Sell |
 +| 38 | OrderQty | Int | Y | Total quantity (includes filled portions) |
 +| 40 | OrdType | Char | Y | 1=Market, 2=Limit, 3=Stop, 4=Stop Limit, J=MIT |
 +| 44 | Price | Float | C | Required for Limit, Stop Limit, MIT |
 +| 99 | StopPx | Float | C | Required for Stop, Stop Limit |
 +| 59 | TimeInForce | Char | Y | 0=Day, 1=GTC, 3=IOC, 4=FOK |
 +| 60 | TransactTime | UTCTimestamp | Y | Replace request time |
 +| 21 | HandlInst | Char | O | 1=Automated private, 2=Automated public, 3=Manual |
 +| 210 | MaxShow | Int | O | Iceberg visible quantity |
 +| 77 | OpenClose | Char | O | O=Open, C=Close |
 +| 200 | MaturityMonthYear | String | O | Format: YYYYMM |
 +| 204 | CustomerOrFirm | Int | O | 0=Customer, 1=Firm |
 +| 58 | Text | String | O | Free form text |
 +| 107 | SecurityDesc | String | O | Security description |
 +| 1028 | ManualOrderIndicator | Boolean | O | Y=Manual, N=Automated |
 +| 10100 | TrailingDelta | Float | O | Trailing stop amount |
 +| 10103 | ActivationValue | String | O | Activation conditions (colon-delimited) |
 +| | **Message Trailer** | | Y | |
 +
 +===== Sample Messages =====
 +
 +**Note:** Pipe (|) used for readability. Actual FIX messages use SOH (ASCII 01) delimiter.
 +
 +**Replace API-Submitted Order:**
 +<code>
 +8=FIX.4.2|9=250|35=G|49=T4Example|56=T4|50=TraderName|52=20121212-16:43:37.426|
 +1=Account1|11=fr-634909058174264921|41=fn-634909058088464770|
 +37=C8D64D65-7FCD-472B-9A55-3E77F404F1BE|48=CME_20121200_ESZ2|55=ES|207=CME_Eq|
 +167=FUT|54=1|38=1|40=2|44=143025|59=0|21=1|60=20121212-16:43:37.426|204=0|10=123|
 +</code>
 +
 +**Replace Frontend-Submitted Order:**
 +<code>
 +8=FIX.4.2|9=250|35=G|49=T4Example|56=T4|50=TraderName|52=20121212-18:05:57.929|
 +1=Account1|11=fr-634909107579297721|41=FA657BC9-A1D2-4644-B558-A1155C731DA4|
 +37=FA657BC9-A1D2-4644-B558-A1155C731DA4|48=CME_20121200_ESZ2|55=ES|207=CME_Eq|
 +167=FUT|54=1|38=1|40=2|44=143075|59=0|21=1|60=20121212-18:05:57.929|204=0|10=123|
 +</code>
 +
 +===== Notes =====
 +  * Malformed messages rejected with Session Reject (35=3)
 +  * Application errors returned via Order Cancel Reject (35=9)
 +  * Market, Flatten, and Hit orders cannot be replaced
 +  * OCO/AutoOCO orders must be replaced one component at a time
 +  * Previously rejected orders can be replaced using ClOrdID from rejection