Cancel Replace
CANCELREPLACE is a guarded CANCEL followed by PLACE, not a broker-atomic edit. It accepts the replacement fields used by PLACE, but the replacement is submitted only after the original cancellation requirements for the selected destination are satisfied.
The order_id field is required to identify the working order. The requested account must own that order, and the replacement must use the same exact contract. CANCELREPLACE cannot move an order to another account or contract. If the reference is missing, inactive, or fails either ownership check, the command returns an error without canceling it.
Example Payload
The following alert cancels order abc123 and, after the required cancellation confirmation, uses the remaining fields for the replacement:
key=your-secret-key;
command=cancelreplace;
account=sim101;
instrument=ES 09-26;
action=buy;
qty=1;
order_type=market;
tif=day;
order_id=abc123;
CANCELREPLACE works with destination=tradovate; as an owner-fenced, durably staged workflow. CrossTrade validates the replacement before touching the original, verifies the same-account and same-contract boundary, confirms that the leader reached Canceled, and confirms cancellation of every mapped signal-copier follower before replacement fan-out. If a required follower mapping is unavailable or any cancellation cannot be confirmed, replacement is withheld.
The durable recovery state makes a retry of the same operation resumable and idempotent. If Tradovate returns an ambiguous cancellation or placement outcome, CrossTrade never blindly resends that mutation. The response includes reconciliation_required; inspect the original and possible replacement in Tradovate before attempting a different replacement payload. order_id accepts either the numeric Tradovate order id or the order_id assigned on the original place alert.
With Strategy Sync, Tradovate CANCELREPLACE accepts out_of_sync=wait or ignore; flatten and resync are rejected before cancellation because their separate position mutation cannot be recovered safely inside this workflow. wait returns after withholding the current replacement. It does not queue it for later.