Cancel Replace

Created at 14 May 2025, 07:26
FU

fudheryk

Joined 07.04.2025

Cancel Replace
14 May 2025, 07:26


Hi, 

I'm experiencing an unexpected behavior in my FIX 4.4 integration and would appreciate some clarification regarding ClOrdID handling during order replacement. 

Context: 

1/ I submit a STOP SELL order (35=D, ClOrdID=17460533) which is successfully acknowledged with ExecType=0 (NEW).

[2025-04-30 15:47:26.516855][DEBUG][log_fix_message] [FIX] toApp Message : 8=FIX.4.49=137 35=D 34=2 49=demo.icmarkets.9415567 52=20250430-13:47:26.516 56=cServer 11=17460718 38=0.01 40=1 54=1 55=10026 59=3 60=20250430-13:47:26 10=019

[2025-04-30 15:47:26.641485][DEBUG][log_fix_message] [FIX] fromApp Message : 8=FIX.4.4 9=202 35=8 34=2 49=cServer 50=TRADE 52=20250430-13:47:25.892 56=demo.icmarkets.9415567 11=17460718 14=0 37=829045463 38=0.01 39=0 40=1 54=1 55=10026 59=3 60=20250430-13:47:25.888 150=0 151=0.01 721=498203425 10=097

2/ I send then a 35=G Replace request with a new ClOrdID=17460983 and OrigClOrdID=17460533, updating the StopPx.

[2025-04-30 15:47:28.777641][DEBUG][log_fix_message] [FIX] toApp Message : 8=FIX.4.49=116 35=G 34=4 49=demo.icmarkets.9415567 52=20250430-13:47:28.777 56=cServer 11=17460983 38=0.01 41=17460533 99=93749.16 10=130

3/ Your server responds with an Execution Report with ExecType=5 (REPLACED), confirming the modification.

[2025-04-30 15:47:28.888474][DEBUG][log_fix_message] [FIX] fromApp Message : 8=FIX.4.49=214 35=8 34=5 49=cServer 50=TRADE 52=20250430-13:47:28.142 56=demo.icmarkets.9415567 11=17460983 14=0 37=829045563 38=0.01 39=0 40=3 54=2 55=10026 59=1 60=20250430-13:47:28.139 99=93749.16 150=5 151=0.01 721=498203425 10=182

However, the final execution report (ExecType=F) refers back to the original ClOrdID=17460533, not the one used in the replacement.

[2025-04-30 15:47:30.305172][DEBUG][log_fix_message] [FIX] fromApp Message : 8=FIX.4.49=233 35=8 34=7 49=cServer 50=TRADE 52=20250430-13:47:29.307 56=demo.icmarkets.9415567 6=93748.76 11=17460533 14=0.01 32=0.01 37=829045563 38=0.01 39=2 40=3 54=2 55=10026 59=1 60=20250430-13:47:29.261 99=93749.16 150=F 151=0 721=498203425 10=068

As a result: Any further Replace using OrigClOrdID=17460983 is rejected with ORDER_NOT_FOUND.

[2025-04-30 14:58:09.652982][DEBUG][log_fix_message] [FIX] fromApp Message : 8=FIX.4.49=157 35=j 34=4 49=cServer 50=TRADE 52=20250430-12:58:08.963 56=demo.icmarkets.9415567 58=ORDER_NOT_FOUND:Order with clientOrderId=0 not found. 379=17460778 380=0 10=252

This suggests that the replacement ClOrdID is not fully acknowledged or tracked as the current active order, despite the previous ExecType=5 confirmation. 

 

Questions: 

  • Does your server intentionally keep referencing the original ClOrdID (17460533) in Execution Reports even after a successful replace (ExecType=5)? 
  • Is the ClOrdID used in the 35=G message (e.g., 17460983) considered active and valid for future actions, or should we continue referencing the original ClOrdID? (ClOrdID in 35=G is maybe temporary and transactional only ?) 
  • What is the recommended best practice to safely chain multiple Replace requests? 

 

Thank you in advance for your assistance and clarification.


@fudheryk