Skip to main content

Binary Order Entry Execution Streams and Recovery

An acknowledgement confirms acceptance, not a fill. Use execution reports for order state and reconcile after any uncertainty.

Execution reports on the TCP connection​

Reports arrive as kind 26 inside SequencedData. Enable them in the handshake with HandshakeHello.gateway_capabilities; the HandshakeAck echoes the granted bits. A zero echo means not granted.

BitCapability
1 << 0Version 1: OrderState, Fill, Gap
1 << 1Version 2: adds FillLifecycle, one record with the fill and the post-fill order state (lastQty, cumQty, leavesQty, ordStatus)

Use version 2.

  • The stream binds to your account on the first accepted order of the session. Before that, read open state from GET /api/v1/bsl/accounts/{account}/executions?cursor=.
  • A report never arrives before the ack of the frame that caused it.
  • Reports carry a per-account cursor. SessionResume continues from the stored cursor.
  • If the retention window no longer covers your cursor, you receive a Gap report and the stream stops. Take an account snapshot over REST, then reconnect.
  • Content matches FIX drop copy and the private WebSocket dropCopy channel.

Other delivery routes​

RouteUse
GET /api/v1/bsl/executionsStream and replay contract
GET /api/v1/bsl/accounts/{account}/executions?fromSeq=NGap-fill; fromSeq is inclusive; needs a token or credential
wss://api.sentico-labs.xyz/api/v1/ws/bsl/{account}Private WebSocket, same protocol as private channels

Reference: execution gap-fill.

Reject codes​

CodeNameMeaningAction
100BackpressureFullCapacity refused the requestBack off; keep the command identity when retrying
103TradingHaltedTrading is haltedPause; do not retry in a loop
104LedgerDegradedLedger admission closedPause until recovery
105WriteLeaseFencedWriter fencedReconnect and reconcile; no automatic replay
106DurabilityUnknownThe order may have been admittedQuery status for the original order; never send a new order
108IpcTransportUnavailableFailed before submissionRetry only the identical request
200AuthFailedAuthorization failedFix key, signature or policy
202SessionViolationIdentity, sequence or mapping mismatchReconnect; do not retry
205NonceAboveWindowNonce above nonceFloor + 256Use a nonce from nonceHoles

Rejects do not close the session. Unknown codes must stay visible and must not trigger automatic retries. Fast rejects are a signal to widen, pause or reconnect.

Uncertain outcomes​

If a response is lost after send, the outcome is unknown.

  1. Keep the original order, nonce and idempotency key.
  2. Read receipts, execution reports and account orders.
  3. Resubmit only the identical request, never a new order.
  4. A connection failure before send proves the order was not submitted.

Acceptance checks per connection​

  1. Authenticate on the real connection.
  2. Submit an order below the minimum notional and confirm its reject.
  3. Submit a valid order on the same session, then cancel it and wait for the terminal report.
  4. Reconnect with the original identities and check for no duplicate order or fill.
  5. Test connection failure before and after send.

Next steps​