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.
| Bit | Capability |
|---|---|
1 << 0 | Version 1: OrderState, Fill, Gap |
1 << 1 | Version 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.
SessionResumecontinues from the stored cursor. - If the retention window no longer covers your cursor, you receive a
Gapreport and the stream stops. Take an account snapshot over REST, then reconnect. - Content matches FIX drop copy and the private WebSocket
dropCopychannel.
Other delivery routes
| Route | Use |
|---|---|
GET /api/v1/bsl/executions | Stream and replay contract |
GET /api/v1/bsl/accounts/{account}/executions?fromSeq=N | Gap-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
| Code | Name | Meaning | Action |
|---|---|---|---|
| 100 | BackpressureFull | Capacity refused the request | Back off; keep the command identity when retrying |
| 103 | TradingHalted | Trading is halted | Pause; do not retry in a loop |
| 104 | LedgerDegraded | Ledger admission closed | Pause until recovery |
| 105 | WriteLeaseFenced | Writer fenced | Reconnect and reconcile; no automatic replay |
| 106 | DurabilityUnknown | The order may have been admitted | Query status for the original order; never send a new order |
| 108 | IpcTransportUnavailable | Failed before submission | Retry only the identical request |
| 200 | AuthFailed | Authorization failed | Fix key, signature or policy |
| 202 | SessionViolation | Identity, sequence or mapping mismatch | Reconnect; do not retry |
| 205 | NonceAboveWindow | Nonce above nonceFloor + 256 | Use 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.
- Keep the original order, nonce and idempotency key.
- Read receipts, execution reports and account orders.
- Resubmit only the identical request, never a new order.
- A connection failure before send proves the order was not submitted.
Acceptance checks per connection
- Authenticate on the real connection.
- Submit an order below the minimum notional and confirm its reject.
- Submit a valid order on the same session, then cancel it and wait for the terminal report.
- Reconnect with the original identities and check for no duplicate order or fill.
- Test connection failure before and after send.