Mass Quote
Submit a batch of cancel-replace pairs as a single atomic operation. Designed for market makers who update multiple price levels simultaneously. Available to Prime and Apex tiers only.
Mass quotes use the MPC engine's batch_compare pipelining, which fuses N comparisons into shared communication rounds with a constant round count. A batch of up to 20 cancel-replace pairs costs roughly the same MPC wall-clock time as 1–2 sequential operations.
Endpoint
POST /orders/mass-quote
Auth: Authorization: Bearer <access_token>. Tier must be Prime or Apex — see VIP Tiers.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
legs | array | Yes | Cancel-replace legs (max 20) |
Each leg:
| Field | Type | Required | Description |
|---|---|---|---|
cancel_order_id | string | Yes | Venue order id to cancel |
symbol | string | Yes | Instrument id |
side | string | Yes | buy or sell |
type | string | No | Must be limit (default). Other types are rejected. |
price | number | Yes | New order price |
quantity | number | Yes | New order quantity |
time_in_force | string | No | GTC (default) or GTT. IOC / FOK not permitted. |
expiry_time | integer | For GTT | Nanosecond epoch |
client_order_id | string | No | Idempotency key for the replacement leg |
Example
curl -X POST https://api.godarkdex.com/api/v1/orders/mass-quote \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"legs": [
{ "cancel_order_id": "ord_01HXYZ001", "symbol": "BTC-USDC-PERP", "side": "buy", "price": 94800, "quantity": 0.5 },
{ "cancel_order_id": "ord_01HXYZ002", "symbol": "BTC-USDC-PERP", "side": "buy", "price": 94900, "quantity": 0.3 },
{ "cancel_order_id": "ord_01HXYZ003", "symbol": "BTC-USDC-PERP", "side": "sell", "price": 95100, "quantity": 0.4 }
]
}'
Success Response
{
"code": 0,
"data": {
"results": [
{ "leg": 0, "status": "open", "cancelled_order_id": "ord_01HXYZ001", "new_order_id": "ord_01HXYZ101" },
{ "leg": 1, "status": "open", "cancelled_order_id": "ord_01HXYZ002", "new_order_id": "ord_01HXYZ102" },
{ "leg": 2, "status": "open", "cancelled_order_id": "ord_01HXYZ003", "new_order_id": "ord_01HXYZ103" }
]
},
"timestamp": "2026-04-20T10:30:00.123Z",
"request_id": "req_01HXYZ..."
}
Partial Failure
Legs are executed independently. If one leg's cancel target has already filled, the remaining legs continue. Failed legs report their error inline:
{
"code": 0,
"data": {
"results": [
{ "leg": 0, "status": "open", "cancelled_order_id": "ord_01HXYZ001", "new_order_id": "ord_01HXYZ101" },
{ "leg": 1, "status": "failed", "error_code": 1400, "message": "Order not found or already filled" },
{ "leg": 2, "status": "open", "cancelled_order_id": "ord_01HXYZ003", "new_order_id": "ord_01HXYZ103" }
]
},
"timestamp": "2026-04-20T10:30:00.123Z",
"request_id": "req_01HXYZ..."
}
Rate Limiting
Mass quotes have a dedicated counter and don't deduct from regular order or cancel limits. Each batch counts as 1 MPC action regardless of leg count. See Rate Limits.
Notes
- Max 20 legs per batch.
- All legs in a batch should target the same
symbolfor optimal MPC batching. - Available to Prime and Apex tiers only. Lower tiers receive
1429. - Only
limitlegs withGTCorGTTare supported — see Order Compatibility. - Pre-trade risk validation applies to each replacement leg individually.