edit_order
Amend a resting order's price or size atomically with a pre-trade margin check. Requires API credentials; liquidation orders excluded.
Instructions
Amend a resting order's price and/or size in one atomic cancel-replace operation. At least one of price or size is required; a pre-trade margin check is applied to the replacement before it is accepted. Liquidation orders cannot be amended. Requires API credentials. This modifies a REAL order on the matching engine.
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": {
"order_id": "<order_id>",
"market_id": "<market_id>"
},
"name": "edit_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | New order size in base units as a positive decimal string (> 0). Optional if `price` is given. | |
| price | No | New limit price as a positive decimal string (> 0). Optional if `size` is given. | |
| order_id | Yes | Id of the resting order to amend. | |
| market_id | Yes | Market the order rests on (required for routing). |