Documentation Index
Fetch the complete documentation index at: https://docs.bayse.markets/llms.txt
Use this file to discover all available pages before exploring further.
New endpoint
Batch amend orders — POST /v1/pm/orders/batch/amend
Modify the price and/or size of up to 20 open CLOB orders in a single round-trip. The natural complement to batch place and batch cancel — designed for market makers running cancel-and-replace ladders who want to keep time priority where possible instead of always going to the tail of the queue.
newPriceandnewSizeare independently optional — supply one or both. The omitted field keeps its current value. Items with neither field are rejected per-item withBAD_REQUEST.- Total size, not delta —
newSizeis the new TOTAL size in the order’s original currency. For partial-filled orders the new remaining becomesnewSize − filledSize. - Per-item failure isolation — bad items return their own error without aborting siblings. Failures use the same per-item shape as the place/cancel batches.
- Funding rejection codes —
INSUFFICIENT_BALANCE(BID amend exceeds wallet) andINSUFFICIENT_SHARES(ASK amend exceeds free shares) surface per-item rather than failing the whole call. - Cross-market — items may target orders in different markets and events.
- Time priority — preserved when the new
(price, size)is unchanged or shrunk at the same price level. Price moves go to the new tail. - Self-trade prevention — fixed server policy: amend always uses
CANCEL_OLDESTto resolve same-user crossers at the new price. The order’s restingstpMode(set at placement) governs matching, not amend. Crossers being amended in the same batch are excluded from the cancel set. - Idempotency — supports the standard
Idempotency-Keyheader with the same 24-hour replay semantics as the other batch endpoints.
Breaking changes
Batch place + amend max items: 50 → 20
BothPOST /v1/pm/orders/batch and POST /v1/pm/orders/batch/amend now accept at most 20 items per call (was 50 for batch place). Larger payloads are rejected with 400 BAD_REQUEST before any items reach the matching engine. The cap on DELETE /v1/pm/orders/batch (batch cancel) is unchanged at 100.
Rationale: bound wallet round-trips and DB statement sizes under high-frequency cancel-and-replace ladders. Existing integrations sending up to 20 items per batch are unaffected.
Enhancements
Cancel-and-replace cycle guidance
The Batch orders concept page documents the canonical three-step cycle for re-quoting:cancel → amend → place. Each step’s wallet/balance state is visible to the next, so size-up amends in step 2 can use capacity freed by step 1.