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

FieldTypeRequiredDescription
legsarrayYesCancel-replace legs (max 20)

Each leg:

FieldTypeRequiredDescription
cancel_order_idstringYesVenue order id to cancel
symbolstringYesInstrument id
sidestringYesbuy or sell
typestringNoMust be limit (default). Other types are rejected.
pricenumberYesNew order price
quantitynumberYesNew order quantity
time_in_forcestringNoGTC (default) or GTT. IOC / FOK not permitted.
expiry_timeintegerFor GTTNanosecond epoch
client_order_idstringNoIdempotency 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