Binary Order Entry Order Entry
Orders are signed actions submitted over the TCP connection or as an HTTP byte batch. Use the 20-byte engine account in payload.account, not the 32-byte trading-account id.
Actions
| Action | Use |
|---|---|
SpotPlaceOrder | Spot order |
PlaceOrder | Outcome-market order with book YES or NO |
Cancel | Cancel by order id |
AmendOrder | Quantity reduction that keeps queue priority |
SpotQuoteReplace, QuoteReplace | Atomic cancel and place of a quote |
Other actions, such as deposit credits or market creation, are rejected on this path.
HTTP routes
| Route | Use |
|---|---|
POST /api/order-entry/binary | Byte batch with a provisioned order-entry key |
POST /api/v1/bsl/orders/compact | Byte batch with HMAC authentication |
POST /api/v1/bsl/orders/replace | Replace |
POST /api/v1/bsl/orders/cancel-all | Cancel all, optionally by market, book, side |
POST /api/v1/bsl/sessions/cancel-on-disconnect | Cancel-on-disconnect cleanup |
GET /api/v1/bsl/limits | Rate limits, batch sizes, nonceModel, errorGuidance |
GET /api/v1/bsl/receipts | Receipts by account and seqs |
Read GET /api/v1/bsl/limits instead of hard-coding limits. Reference: submit batch, limits, receipts.
POST /api/v1/bsl/orders/compact
Content-Type: application/x-senticore-order-entry-batch
X-BSL-Result-Mode: ack
X-Senticore-Response-Mode: detailed
Idempotency-Key: strategy-42-batch-9001
SC-Auth-Version: 2
SC-Key: <apiKeyId>
SC-Nonce: <fresh nonce>
SC-Timestamp: <unix ms>
SC-Passphrase: <apiPassphrase>
SC-Signature: <hmac>
{ "version": 1, "idempotencyKey": "strategy-42-batch-9001",
"actions": [ { "payload": { "account": "0x1111111111111111111111111111111111111111", "nonce": 4810, "client_order_id": "strategy-42-1", "ts": 1781715570085,
"action": { "PlaceOrder": { "market": 1, "book": "YES", "side": "Bid", "price": 100000, "qty": 1000, "time_in_force": "gtc" } } },
"signature": { "scheme": "EcdsaSecp256k1", "bytes": [ "<65 integers, 0-255: r || s || v>" ] } } ] }
bytes is the 65-byte signature as integers; the example shows a placeholder. client_order_id is optional; when set, it is part of the signed payload. For ack mode each action needs payload (account, nonce, ts, action) and signature. X-BSL-Result-Mode is ack or full; X-Senticore-Response-Mode sets the detail of the response body.
Send the JSON as UTF-8 bytes. Do not use application/json. A missing HMAC or order-entry key authorizes the route only; every action still needs its own valid signature.
Response
| Field | Meaning |
|---|---|
ok | Batch accepted |
seqs | Sequence numbers of accepted actions |
derivedOrderIds | Order ids; derive locally from the signed payload if missing |
acceptedActions | Number of signed parent actions |
receiptPath | Receipt lookup for seqs |
An acknowledgement is not a terminal order state. Reconcile through execution reports, account reads or receipts. Keep the full response body and x-request-id.
Atomic batches
A batch or group is admitted as one unit. If one leg fails, the whole batch is dropped and the receipt shows status: dropped, applied: false. Common causes: a YES or NO ask without minted shares, too little base asset for a spot ask, or notional below instrumentConfig.minNotionalMicro. Check each leg before submitting a two-sided quote.
Rejects
| Reject | Meaning | Action |
|---|---|---|
TRADING_HALTED | Trading is halted | Pause quoting; check tradingHalted on GET /api/v1/status |
403 AGENT_AUTH_FAILED | Credential lacks permission | Fix the credential or scope |
205 | Nonce above nonceFloor + 256 | Re-sign with a nonce from nonceHoles or any unused in-window nonce |
415, 400, 413 | Wrong content type, malformed batch, body too large | Fix the request |
Transport-level codes are listed in Execution streams and recovery.