Skip to main content

BSL Order Entry

BSL order entry exposes the hotpath result contract directly. Use it when a client needs deterministic, low-latency answers for place, cancel, replace, and quote-refresh flows.

JSON Batch

POST /api/v1/bsl/orders/batch
Content-Type: application/json
X-BSL-Result-Mode: full
Idempotency-Key: strategy-42-batch-9001
{
"resultMode": "full",
"actions": [
{
"payload": {},
"signature": "0x..."
}
]
}

The actions array contains signed actions. clientOrderId must be inside the signed action payload when the client needs deterministic reconciliation by client id.

Compact Batch

POST /api/v1/bsl/orders/compact
Content-Type: application/x-senticore-order-entry-batch
X-BSL-Result-Mode: ack

The body is the compact order-entry batch payload used by low-latency clients. The response carries BSL metadata in x-bsl-* headers and keeps the body shape compatible with existing compact clients.

Cancel and Replace

POST /api/v1/bsl/orders/replace
Content-Type: application/json
X-BSL-Result-Mode: full

Replace is modeled as one BSL result boundary. Clients should not infer success from request acceptance alone. In full mode the response must be reconciled from the engine result:

StatusClient action
filledPosition and exposure changed immediately.
partially_filledContinue quoting with updated leaves quantity.
restingNew order is live on the book.
canceledCancel side completed.
rejectedInspect rejectCode; do not assume old order is gone unless the result says so.

Cancel by clientOrderId, mass-cancel per session, and cancel-on-disconnect should use the same BSL session and private stream for reconciliation.

Timing Fields

Every BSL response includes timing fields so clients can locate latency instead of guessing:

FieldMeaning
gatewayReceivedTsServer ingress timestamp.
authDoneTsAuth and credential gate completed.
riskDoneTsRisk or credit approval completed when applicable.
sequencedTsRequest entered sequencing.
engineAppliedTsEngine terminal event timestamp when available.
durableTsDurable acknowledgement timestamp when requested and reached.
responseSentTsResponse emission timestamp.

The durationsUs object carries microsecond breakdowns for auth, routing, risk, enqueue, ack resolution, response emission, and total server time.

Client Rules

  • Use ack for high-rate quote refreshes that reconcile from the stream.
  • Use full for IOC/FOK, cancel, and replace.
  • Use durable only when persistence acknowledgement is more important than response latency.
  • Treat Idempotency-Key as the retry dedup key.
  • Treat clientOrderId as the strategy correlation id.
  • On SHARD_BUSY or QUEUE_LIMIT, back off or reroute quoting for that market.