update_order
Modify an existing limit order's amount, trigger price, take-profit and stop-loss together, or cancel it by setting the delete flag.
Instructions
Update or delete an existing limit order. Set isDelete=true to cancel (no other fields needed). An update replaces amount, triggerPrice and TP/SL together, so all four are required.
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": {
"chainId": "<chainId>",
"orderId": "<orderId>"
},
"name": "update_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | New amount in raw units (required unless isDelete) | |
| apiKey | No | API key for AES encryption | |
| userId | No | Control wallet address | |
| chainId | Yes | Numeric chain ID | |
| orderId | Yes | 64-char hex order ID from get_limit_orders | |
| isDelete | No | Set true to cancel the order | |
| accountRef | No | Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat | |
| lossPercent | No | New SL %, whole number under 100, '0' = none (required unless isDelete) | |
| triggerPrice | No | New trigger price in USD (required unless isDelete) | |
| profitPercent | No | New TP %, whole number, '0' = none; buy orders only, sell orders ignore it (required unless isDelete) | |
| sessionPrivateKey | No | Session private key from sign-in |