Skip to main content

BSL Execution Streams

BSL execution streams are the intended reconciliation path for professional clients after the initial order-entry acknowledgement. In private beta, access is provisioned per account/session; do not assume the stream is available just because public BSL metadata endpoints respond.

Same-connection TCP stream (preferred)

Direct TCP sessions can receive the full private execution stream on the order-entry connection itself — sequenced ExecutionReport messages (kind 26) with a durable per-account cursor, resume across reconnects, and fail-closed gap semantics. This is the lowest-latency path and requires no second connection. See BSL Direct TCP — Private execution reports for capability negotiation and semantics. The HTTP endpoints below remain the reconciliation backstop and the recovery path after a stream gap.

Metadata

GET /api/v1/bsl/executions

This endpoint is live and returns the stream/replay contract metadata.

Private Gap-Fill

GET /api/v1/bsl/accounts/{account}/executions?fromSeq=12345
Authorization: Bearer <private-session-or-agent-token>

Without a token or BSL machine credential, 401 UNAUTHORIZED is expected. That is the correct protected-read behavior.

WebSocket

GET /api/v1/ws/bsl/{account}?token=<ws-session-token>

Use this only after operations confirms the account has the required BSL stream entitlement. Persist the latest processed sequence in the strategy process so reconnect recovery can start from a known cursor.

Event Fields

Provisioned streams should carry enough data for deterministic reconciliation:

FieldPurpose
seqMonotonic venue sequence.
clientOrderIdStrategy id supplied by the client where the path carries it.
orderIdVenue order id.
statusTerminal or current order status.
filledQtyFilled quantity for this result.
leavesQtyRemaining live quantity.
fillIdFill identifier when a trade event exists.
rejectCodeStable machine code for rejects where available.
marketMarket id.
shardMarket shard id.
engineTsMsEngine timestamp where available.
serverTsMsServer event timestamp.

Startup Pattern

  1. Fetch an account/open-order snapshot.
  2. Open the private stream.
  3. Gap-fill from the snapshot sequence to the stream sequence.
  4. Apply deltas monotonically.

Do not use periodic private reads as the normal lifecycle source for high-rate strategies when stream/drop-copy access is provisioned.