Batch amend orders
Trading
Batch amend orders
Modify the price and/or size of up to 20 open CLOB orders in a single round-trip
POST
Batch amend orders
Modify up to 20 CLOB orders in a single request. Each item names an existing
orderId you own and supplies the new price, the new total size, or both. Orders may belong to different markets and events. CLOB-only: any AMM order is rejected per-item with UNSUPPORTED_ENGINE.
Amend is the natural complement to place/cancel for market makers running cancel-and-replace ladders. It mutates an order in place — preserving time priority when possible — instead of cancelling and re-placing.
See the Batch orders concept page for limits, semantics, and rate-limit behavior.
Authentication
Write authentication required —X-Public-Key, X-Timestamp, and X-Signature headers. See the Authentication guide.
Headers
string
Optional. 1–255 characters of
[A-Za-z0-9_-]. Retries within 24 hours that share the same key, body, and route replay the original response with Idempotent-Replayed: true. A retry with the same key but a different body is rejected with 422. A concurrent retry (sent while the first is still in flight) is rejected with 409 — back off briefly and retry once the first call has finished. Transient responses (5xx, 429, 408) are not cached, so you can recover by retrying.Request body
array
required
1–20 amend items. Each item is processed independently — one bad item does not abort the others.
Self-trade prevention
Self-trade prevention on amend is a fixed server policy: alwaysCANCEL_OLDEST. If the amend would put the order in a position that crosses a same-user resting order, the resting crosser is cancelled and the amend proceeds.
- The order’s resting
stpMode(set at placement) is not consulted for amend — it governs matching-time self-cross behavior on incoming orders, which is a different event from the amend itself. - Orders being amended in the same batch are automatically excluded from the cancel set, so simultaneous amends that transiently cross don’t kill each other.
- If you want an amend to fail rather than cancel a crosser, cancel + re-place instead of amending.
Example request
Response
string
Always
CLOB for batch endpoints today.array
Per-item outcomes, in the same order as the request.
object
Per-item error codes
Order ordering convention
A typical cancel-and-replace cycle uses three sibling calls in this order:DELETE /v1/pm/orders/batch— cancel stale orders (frees locked capital and shares).POST /v1/pm/orders/batch/amend— modify in-place orders (uses the freshly freed capacity).POST /v1/pm/orders/batch— place new orders (uses what remains).
INSUFFICIENT_BALANCE per item that can’t fit even though the batch’s net delta might.
Batch amend charges one rate-limit token per item against your write rate-limit bucket — a 20-item amend costs 20 tokens. Over-budget batches are rejected with
429 before any amends reach the matching engine. See Rate limits.Amend preserves time priority when the new
(price, size) is unchanged or shrunk at the same price level. Price changes (up or down) move the order to the new tail of the new level, same as a cancel-and-replace.