BSL API
BSL is the Business Line interface for latency-sensitive order entry. It is the client contract for professional quoting, cancel/replace, execution replay, and session controls. The older market-maker and binary names remain as compatibility routes, but new integrations should use BSL names and headers.
BSL is not a separate matching engine. Orders still pass through the same auth, risk, sequencing, WAL, matching, event ring, and recovery model as the rest of the venue. The difference is that the interface exposes that hotpath truth directly instead of hiding it behind read-plane polling.
Core Endpoints
| Endpoint | Purpose |
|---|---|
POST /api/v1/bsl/orders/batch | JSON signed action batch with explicit result mode |
POST /api/v1/bsl/orders/compact | Compact byte batch for latency-sensitive clients |
POST /api/v1/bsl/orders/replace | Atomic cancel/new replace facade |
POST /api/v1/bsl/orders/cancel-replace | Alias for replace-style order flow |
GET /api/v1/bsl/receipts | Receipt and acknowledgement replay |
GET /api/v1/bsl/limits | Current BSL rate, batch, backlog, and lane limits |
GET /api/v1/bsl/sessions | Authenticated BSL session state |
POST /api/v1/bsl/sessions/cancel-on-disconnect | Stale-order cleanup trigger |
GET /api/v1/bsl/markets/{marketId}/quote-obligations | Two-sided quote obligation state |
GET /api/v1/bsl/executions | Execution stream contract metadata |
GET /api/v1/bsl/accounts/{account}/executions?fromSeq=... | Private execution gap-fill |
GET /api/v1/ws/bsl/{account} | Private execution stream over WebSocket |
Result Modes
BSL result mode is selected with x-bsl-result-mode or the JSON
resultMode field.
| Mode | Meaning | Use |
|---|---|---|
ack | Sequencer accepted the request boundary. | Quote refreshes where stream reconciliation is primary. |
durable | WAL/durable LSN boundary reached. | Slower control flows where persistence acknowledgement matters. |
full | Engine-applied result returned from the hotpath. | IOC/FOK, cancel, replace, and any flow where the client needs the terminal result immediately. |
full responses include actionResults when the request reaches the engine.
Each result includes the client order id, order id, status, filled quantity,
leaves quantity, average price, fee, reject code, market, shard, seq, and engine
timestamps when available.
Response Contract
Every BSL JSON response carries a bsl object:
{
"bsl": {
"contract": "BSL_ORDER_ENTRY_V1",
"contractVersion": 1,
"surface": "orderEntry",
"transport": "json",
"requestedResultMode": "full",
"resultMode": "full",
"streamTruth": "engine_execution_ring",
"privateWsPath": "/api/v1/ws/bsl/{account}",
"executionReplayPath": "/api/v1/bsl/accounts/{account}/executions?fromSeq={seq}",
"rejectCode": null,
"timing": {
"gatewayReceivedTs": 1781715570085,
"authDoneTs": 1781715570085,
"riskDoneTs": 1781715570085,
"sequencedTs": 1781715570085,
"engineAppliedTs": 1781715570086,
"durableTs": null,
"responseSentTs": 1781715570086,
"durationsUs": {
"total": 1072,
"auth": 3,
"routing": 12,
"risk": 0,
"enqueue": 0,
"ackResolution": 0,
"responseEmit": 58
}
}
}
}
Compact byte responses expose the same contract through x-bsl-* headers.
Fast Rejects
BSL clients should treat fast rejection as healthy backpressure. A quick reject is better than letting a quote age silently in an overloaded queue.
Stable BSL reject codes include:
| Code | Meaning |
|---|---|
SHARD_BUSY | The target market shard is overloaded. |
QUEUE_LIMIT | The BSL lane or ingress queue is full. |
RISK_CREDIT_LIMIT | Risk or credit policy blocked the action. |
KILL_SWITCH | Account, market, or venue kill-switch is active. |
MARKET_HALTED | Market state does not allow the requested action. |
AUTH_REQUIRED | Missing or invalid BSL credentials. |
PERMISSION_DENIED | Credential lacks the requested scope. |
DUPLICATE_OR_STALE | Nonce, idempotency, or duplicate replay state rejected the request. |
INVALID_REQUEST | Frame, schema, or request payload is invalid. |