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
| Method | Path | Auth | Description |
|---|---|---|---|
POST | /api/v1/orders | Key or session | Post an order and run the quote round. Supports Idempotency-Key. |
GET | /api/v1/orders/:id | Key or session | An order you posted, with every quote and its checks. |
GET | /api/v1/fills | Key or session | Your fills, newest first. ?limit= up to 200. |
POST | /api/v1/fills/:id/settle | Key or session | Report a payment signature. Verified on Solana before the fill settles. |
GET | /api/v1/fills/:id/result | Key or session | Fetch the provider's result for a settled fill. Safe to retry. |
GET | /api/v1/statements | Key or session | Fills in a period. ?from=YYYY-MM-DD&to=YYYY-MM-DD&format=csv|json |
GET | /api/v1/book | Public | Recent orders with quote counts and status. |
GET | /api/v1/stats | Public | Market-wide totals. |
GET | /api/v1/types | Public | Supported request types with example parameters. |
GET | /api/v1/providers | Public | All providers with 30-day SLA statistics. |
GET | /api/v1/providers/:slug | Public | One provider. |
GET | /api/v1/ledger | Public | Ledger entries, newest first. ?before=seq&limit= |
GET | /api/v1/ledger/verify | Public | Recompute the whole hash chain. |
GET | /api/v1/anchors | Public | On-chain anchors of the ledger head. |
GET | /api/v1/receipts/public-key | Public | The receipt signing key. |
POST | /api/v1/receipts/verify | Public | Check a receipt signature. |
POST /api/v1/orders
| Field | Type | Description |
|---|---|---|
type | string | A request type, for example price.spot. |
params | object | Parameters for that type. All values are strings. |
max_price | string | Most 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." } }| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | Body failed validation. The message names the field. |
| 401 | unauthorized | Missing or revoked API key, or not signed in. |
| 402 | payment_not_verified | The signature did not prove the required payment. The message says why. |
| 402 | payment_required | Result requested before the fill was settled. |
| 403 | read_only_key / type_not_allowed / over_max_per_order / daily_budget_exceeded | Blocked by the key's spend policy. |
| 409 | fill_expired / signature_used | Payment window closed, or the transaction already settled another fill. |
| 502 | provider_error | The provider failed to deliver. Retry the result call; payment is recorded. |