API reference

Base URL https://stellarbook.xyz. All requests and responses are JSON. Amounts are decimal strings in USDC.

Authentication

Send your API key as a bearer token. Keys are created in the dashboard and act for the wallet that created them.

http
Authorization: Bearer sbk_live_…

Endpoints

MethodPathAuthDescription
POST/api/v1/ordersKey or sessionPost an order and run the quote round. Supports Idempotency-Key.
GET/api/v1/orders/:idKey or sessionAn order you posted, with every quote and its checks.
GET/api/v1/fillsKey or sessionYour fills, newest first. ?limit= up to 200.
POST/api/v1/fills/:id/settleKey or sessionReport a payment signature. Verified on Solana before the fill settles.
GET/api/v1/fills/:id/resultKey or sessionFetch the provider's result for a settled fill. Safe to retry.
GET/api/v1/statementsKey or sessionFills in a period. ?from=YYYY-MM-DD&to=YYYY-MM-DD&format=csv|json
GET/api/v1/bookPublicRecent orders with quote counts and status.
GET/api/v1/statsPublicMarket-wide totals.
GET/api/v1/typesPublicSupported request types with example parameters.
GET/api/v1/providersPublicAll providers with 30-day SLA statistics.
GET/api/v1/providers/:slugPublicOne provider.
GET/api/v1/ledgerPublicLedger entries, newest first. ?before=seq&limit=
GET/api/v1/ledger/verifyPublicRecompute the whole hash chain.
GET/api/v1/anchorsPublicOn-chain anchors of the ledger head.
GET/api/v1/receipts/public-keyPublicThe receipt signing key.
POST/api/v1/receipts/verifyPublicCheck a receipt signature.

POST /api/v1/orders

FieldTypeDescription
typestringA request type, for example price.spot.
paramsobjectParameters for that type. All values are strings.
max_pricestringMost you will pay, in USDC, up to 6 decimals. Capped at 100.

Returns 201 with order, quotes and fill (null when unfilled). A repeated Idempotency-Key on the same API key returns the original order with 200 and the header Idempotent-Replayed: true.

Errors

json
{ "error": { "code": "daily_budget_exceeded", "message": "This order would exceed the key's daily budget." } }
StatusCodeMeaning
400invalid_requestBody failed validation. The message names the field.
401unauthorizedMissing or revoked API key, or not signed in.
402payment_not_verifiedThe signature did not prove the required payment. The message says why.
402payment_requiredResult requested before the fill was settled.
403read_only_key / type_not_allowed / over_max_per_order / daily_budget_exceededBlocked by the key's spend policy.
409fill_expired / signature_usedPayment window closed, or the transaction already settled another fill.
502provider_errorThe provider failed to deliver. Retry the result call; payment is recorded.