Amend Trade
PATCH /api/v1/trades/{tradeID}Scope: trades:write
Modify an active, paused, or pending trade. At least one field is required.
Request
{
"target_size": "3.0",
"target_spread": "0.5",
"max_slippage": "0.2",
"size_type": "base",
"spread_type": "absolute"
}| Field | Type | Description |
|---|---|---|
target_size | string | New target size — must be ≥ current filled_size |
target_spread | string | New target spread |
max_slippage | string | New max slippage (non-negative decimal) |
size_type | string | base or notional |
spread_type | string | absolute, percentage, bps, or ticks — can only be amended together with target_spread (400 otherwise) |
Response
200 OK
{
"status": "amendment_sent",
"trade_id": "00000000-0000-0000-0000-000000000000"
}The amendment is applied on the next quote cycle — no need to cancel and
recreate. If the amendment was saved but couldn't be delivered to the
running trade immediately, you'll get 202 Accepted with
"status": "amendment_persisted" and a warning; it's applied as soon as
possible.
Behavior notes
- Increasing
target_size— execution continues toward the new target. - Decreasing
target_sizebelowfilled_size— rejected with400. Cancel and start a new smaller trade instead. - Decreasing
target_sizeto exactlyfilled_size— stops further filling: the open maker order is canceled on the next quote cycle. The trade stays in its current status; cancel it when you're done with it. - Tightening
target_spread— strategy will wait for the spread to recover before posting new makers. No existing fills are unwound. - Loosening
target_spread— strategy may immediately post and fill, depending on current spread.
⚠️
Amendments are blocked during system maintenance. Cancels are still
allowed during maintenance — so if you need out, use DELETE instead.
Example
curl -X PATCH https://api.spreadr.xyz/api/v1/trades/{tradeID} \
-H "X-API-Key: sprdr_..." \
-H "Content-Type: application/json" \
-d '{"target_size": "3.0"}'