Skip to main content

BSL Operations

BSL is designed for low-latency professional flow, so operations should expose pressure early and keep recovery deterministic.

Session Controls

ControlEndpoint
Current limitsGET /api/v1/bsl/limits
Session stateGET /api/v1/bsl/sessions
Cancel-on-disconnectPOST /api/v1/bsl/sessions/cancel-on-disconnect
Quote obligationsGET /api/v1/bsl/markets/{marketId}/quote-obligations

Cancel-on-disconnect is a production safety control, not a convenience helper. Operations should define the session timeout, heartbeat expectations, and account-level stale-order policy before enabling high-rate quoting.

Backpressure Policy

BSL must reject early when the venue cannot keep latency bounded. The expected client-facing codes are:

CodeOperational cause
SHARD_BUSYMarket shard cannot accept more work without queue aging.
QUEUE_LIMITIngress lane, backlog, or concurrency limit reached.
RISK_CREDIT_LIMITCredit or exposure reservation denied.
KILL_SWITCHAccount, market, or venue kill-switch is active.
MARKET_HALTEDMarket lifecycle gate blocked trading.

For professional clients this is a feature. A fast reject lets the strategy cancel, widen, or reroute immediately.

Observability

Monitor these dimensions per account, market, and shard:

Metric familyWhy it matters
BSL request latency by result modeSeparates ACK, DURABLE, and FULL behavior.
x-bsl-* timing breakdownsLocates latency in auth, risk, queue, engine, durability, or edge.
Reject code countsShows whether clients hit queue, risk, market, or auth limits.
Per-shard exposure and locked creditProtects the venue while enabling multi-market quoting.
Release lag for credit and order reservationsFinds stale locks that harm quoting capacity.
Execution stream gap-fill rateDetects stream disconnects or client lag.

Deployment Checks

Before advertising BSL to a client:

  • GET /api/v1/bsl/limits returns x-bsl-contract: bsl-order-entry-v1.
  • POST /api/v1/bsl/orders/batch returns a bsl envelope on both success and reject paths.
  • POST /api/v1/ws/token tokens work immediately on /api/v1/bsl/accounts/{account}/executions.
  • The private BSL WebSocket emits monotonic execution seq values.
  • Cancel-on-disconnect is tested against a resting-order account.
  • The client has documented behavior for SHARD_BUSY, QUEUE_LIMIT, RISK_CREDIT_LIMIT, KILL_SWITCH, and MARKET_HALTED.