Skip to main content

Bulk Operations

Bulk operations let market makers update many quotes with one request while preserving deterministic acknowledgement behavior.

Signed action batch

The current bulk path accepts a batch of signed actions:

{
"version": 1,
"actions": [
{
"payload": {
"account": "0x1111111111111111111111111111111111111111",
"nonce": 42,
"ts": 1781190000000,
"action": {
"SpotQuoteReplace": {
"market": 1,
"legs": [
{
"side": "Bid",
"price": 999900,
"qty": 100000,
"time_in_force": "post_only"
},
{
"side": "Ask",
"price": 1000100,
"qty": 100000,
"time_in_force": "post_only"
}
]
}
}
},
"signature": {
"scheme": "EcdsaSecp256k1",
"bytes": [1, 2, 3]
}
}
],
"idempotencyKey": "btc-quote-refresh-1842"
}

Submit to POST /api/order-entry/binary with Content-Type: application/x-senticore-order-entry-batch.

Atomicity

Atomicity is action-level, not a separate matching engine:

  • frame, auth, timestamp, and schema failures reject the batch before enqueue
  • accepted actions enter the normal sequencer path
  • terminal state is reconciled from receipts, private streams, or account reads
  • QuoteReplace and SpotQuoteReplace are the preferred quote refresh actions

Cancel and replace

Use QuoteReplace/SpotQuoteReplace legs with cancel_order_id when you want to remove stale quote legs and place new quote legs in one signed action. A leg with cancel_order_id and qty: 0 is cancel-only. A leg without cancel_order_id is place-only.

The legacy facade endpoints still exist:

POST /api/v1/mm/orders/replace
POST /api/v1/mm/orders/cancel-replace

New quote engines should prefer signed action batches unless they are explicitly integrating against the legacy facade.

Idempotency

Use both Idempotency-Key and idempotencyKey in the body for retriable batches. Retrying the same key returns the existing response when the request hash matches. If the request body changes under the same key, treat the response as a client bug and reconcile before submitting new risk.