Skip to main content
Per-match settlement outcomes and on-chain signatures for one engine batch ID.
TL;DRGET /settlement/status/{batch_id} returns every per-match job in a settlement batch. A match can be pending, confirmed, rejected, or ambiguous independently of its siblings. This is an authenticated operational/debug surface; trader clients should treat the orders and fills streams as their primary lifecycle.

GET /settlement/status/{batch_id}

batch_id is an unsigned integer local to the running engine. It is not an on-chain identifier and the order-read response does not promise a batch-id field. Use this endpoint when an operator or diagnostic response has supplied a known batch handle. The engine retains a bounded recent window of terminal batches, so 404 may mean the handle is unknown or has aged out; use the orders and fills streams as the trader-facing lifecycle source. Authenticated with a bearer token:

Response

Each job has a match_idx, current stage, independent outcome, timestamps, and whichever Solana signatures have confirmed so far. Optional fields are omitted until available.

Stages

stage is one of queued, locking_notes, proving, verifying, settling, closing, done, or failed. A done match has confirmed even when the shared marker has not yet been reclaimed; marker close is asynchronous rent cleanup, not part of trade finality.

Outcomes

Do not infer that every match succeeded from a batch-wide stage. Inspect every job. The user-facing order lifecycle commits a fill only for confirmed; a definitive failure emits settlement_failed and requires a fresh order after the input lock expires. See Settlement for the finality model.

Authorizations

Authorization
string
header
required

Short-lived (≤ 1h) bearer token from POST /auth/token.

Expiry is EXACT — there is no grace period past expires_in, on REST or on the streaming transport. Refresh on a margin.

A structurally valid, unexpired token is still refused when it has been revoked (401), when the operator has invalidated the tokens the account was holding (401), or when the account is suspended (403). Suspension also blocks issuing a new one, so re-authenticating does not clear it.

Path Parameters

batch_id
integer<uint64>
required

Response

Settlement status.

batch_id
integer<uint64>
required
jobs
object[]
required

Per-match status in match-index order. Confirmed siblings can reach done while an ambiguous sibling remains settling and redrives.