Quote in bulk
Place, replace, and cancel signed orders in one batch with per-order failure isolation and net-delta reservations, so a flat two-sided re-quote emits no chain transactions.
The batch endpoint lets a quoting desk maintain two-sided, multi-level quotes efficiently: one request places, replaces, and cancels signed orders on one market, with per-order failure isolation. Reservation changes settle as net deltas per wallet and token, so a re-quote that keeps the same committed notional emits zero chain transactions. Every order in a batch is individually EIP-712-signed under exactly the same rules as the single-order endpoint; batching changes throughput, never trust.
Prerequisites
- Everything from Place and cancel orders: registered maker wallets, trading authorizations, and a live market id.
- Batched orders are plain limit interest. Stop orders arm through the single-order endpoint only.
Submit a batch
curl -X POST "https://your-platform.example.com/api/v2/addons/trading-venue-order-batches" \
-H "X-Api-Key: sm_dalp_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"marketId": "0198f1c4-5e6f-7a80-bc13-4d5e6f7a8b9c",
"operations": [
{
"kind": "replace",
"cancelOrderId": "0198f1c4-5e6f-7a80-bc13-4d5e6f7a8b9d",
"maker": "0x14dC79964da2C08b23698B3D3cc7Ca32193d9955",
"recipient": "0x14dC79964da2C08b23698B3D3cc7Ca32193d9955",
"side": "buy",
"orderType": "limit",
"timeInForce": "gtc",
"priceTick": "1011",
"quantity": "1000000000000000000",
"expiry": "1785661200",
"epoch": "0",
"salt": "873245987235",
"maxFeeBps": "25",
"signature": "0x2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae1b"
},
{ "kind": "cancel", "orderId": "0198f1c4-5e6f-7a80-bc13-4d5e6f7a8b9f" }
]
}'The response reports one result per operation, in request order, plus the netted reservation transactions:
{
"data": {
"marketId": "0198f1c4-5e6f-7a80-bc13-4d5e6f7a8b9c",
"results": [
{
"index": 0,
"kind": "replace",
"status": "accepted",
"orderId": "0198f1c4-5e6f-7a80-bc13-4d5e6f7a8ba0",
"orderHash": "0x2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
"cancelledOrderId": "0198f1c4-5e6f-7a80-bc13-4d5e6f7a8b9d",
"reason": null,
"message": null
},
{
"index": 1,
"kind": "cancel",
"status": "accepted",
"orderId": null,
"orderHash": null,
"cancelledOrderId": "0198f1c4-5e6f-7a80-bc13-4d5e6f7a8b9f",
"reason": null,
"message": null
}
],
"reserveTransactionHash": null,
"releaseTransactionHash": "0x9a1c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7"
},
"links": { "self": "/v2/addons/trading-venue-order-batches" }
}Batch semantics
| Operation | Effect |
|---|---|
place | A new signed order through the standard intake checks. |
cancel | Cancels one of your open orders on the market. |
replace | A cancel and a place as one operation: cancelOrderId plus the full new signed order. |
Three rules govern how a batch executes:
- Per-order isolation. Each operation succeeds or fails alone; a rejected operation leaves every accepted one standing.
reasonon a rejected result mirrors the single-order intake rejection reasons. - A replace's halves are independent. The cancel half applies even when the new order rejects, so pulling a quote never fails because its replacement did. The exception is an invalid cancel target: then the whole replace rejects and nothing is placed.
- The whole batch rejects only for whole-batch problems. A batch larger than the venue's configured maximum rejects before any signature verification. The submission rate limit applies too, with each batched order charged as one submission.
Net-delta reservations
The platform computes the batch's reservation change per wallet and token across all operations, and settles only the net:
| Batch outcome | Chain transactions |
|---|---|
| Notional-flat re-quote (releases equal reserves) | None |
| Net reservation increase | One batched reserve transaction |
| Net reservation decrease | One batched release transaction |
Per-order reservation accounting stays exact throughout: every order keeps its own reservation row, and on-chain fill accounting remains the source of truth. Netting only collapses the chain calls, which is what makes continuous two-sided quoting affordable: repricing ten levels on both sides costs zero reservation transactions when the committed notional is unchanged.
Quoting-tier ceilings
The venue distinguishes a quoting tier with its own submission rate limit and open-order ceiling, sized for two-sided multi-level quoting. Tier membership is designated by the venue operator per maker wallet; a wallet not on the tier uses the standard intake ceilings on the batch endpoint too. By default no wallet is on the quoting tier. If your desk quotes continuously, ask the venue operator about quoting-tier designation.
Errors
| Status | What happened | What to do |
|---|---|---|
422 | The whole batch was rejected: oversized, over the rate limit, or a whole-batch intake failure. No operation was applied. | Split the batch or slow down, then resubmit. |
409 | The wallet's cumulative reserved balance would exceed its spendable balance at the batch's net increase. | Reduce the net new exposure in the batch. |
503 | The netted reservation transaction failed; affected orders were rejected with compensation. | Check wallet balances, then resubmit the batch. |
Individual rejected operations do not produce an HTTP error; read them from results.
Related
- Place and cancel orders for the signing contract every batched order follows.
- Read market data and streams for the depth your quotes rest in.
- Administer desks for the operator's maker-checker surface behind desk limits.
How to place Trading Venue stop orders and set time in force
Arm a stop order that reserves nothing while dormant, understand what triggers it and what can invalidate it, and choose between GTC, GTD, and IOC time in force.
How to read Trading Venue market data and streams
Read venue markets, depth, trades, candles, and the ticker through the v2 API, and consume the live market-data stream with sequence-gap resynchronization.