replace_order
Cancel an existing order and place a new one in a single atomic operation to update trading parameters while maintaining position integrity.
Instructions
Replace an existing order (cancel old and place new) in one atomic operation. Requires authentication.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"subaccount_id": "<subaccount_id>",
"order_id": "<order_id>",
"amount": "<amount>",
"price": "<price>"
},
"name": "replace_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subaccount_id | Yes | Subaccount ID | |
| order_id | Yes | Order ID to replace | |
| amount | Yes | New order amount | |
| price | Yes | New order price |