cancel_and_replace_order
Cancel an existing order and replace it with new order parameters, including type, quantity, and price, in a single atomic operation.
Instructions
Atomically cancel an existing order and replace it with new parameters.
⚠️ This modifies an existing order.
Args: order_id: UUID of the existing order to cancel and replace. order_type: MARKET, LIMIT, STOP, or STOP_LIMIT for the replacement. time_in_force: DAY or GTD. Default is DAY. quantity: New quantity for the replacement order. limit_price: New limit price (for LIMIT/STOP_LIMIT orders). stop_price: New stop price (for STOP/STOP_LIMIT orders). expiration_time: Required when time_in_force is GTD. ISO 8601 format. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | ||
| order_type | Yes | ||
| time_in_force | No | DAY | |
| quantity | No | ||
| limit_price | No | ||
| stop_price | No | ||
| expiration_time | No | ||
| account_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |