Cancel Replace

The CANCELREPLACE command is effectively a CANCEL order + PLACE order command combination and accepts similar parameters. The caveat is that the PLACE command will only proceed if and only if the the order exists and was successfully canceled.

The order_id field is required to identify the order in question to cancel. If it is not found or not linked to an active order, an error message will be returned.

Example Payload

The following alert message will cancel the order with ID "abc123" and execute the remaining fields as a PLACE order command:

key=your-secret-key; 
command=CANCELREPLACE; 
account=sim101; 
instrument=NQ 12-24; 
action=BUY; 
qty=1; 
order_type=MARKET; 
tif=DAY; 
order_id=abc123;

Last updated