Docs localnet · batch — · opens in —

API

The read API the site uses. Every route is GET; responses are validated by the same schemas on both sides.

1 Routes

Every route below is served from https://api.unison.computer.

/v1/config
cluster, program addresses, drand chain, timing, economics
/v1/batches/current
the open batch, the waiting batch and the last opened
/v1/batches
cleared batches, newest first; filter by pair
/v1/batches/:round
one batch: beacon, seals, orders, clearings
/v1/accounts/:owner
balances and locks
/v1/accounts/:owner/history
orders, deposits and withdrawals
/v1/orders/:seal
one order's lifecycle
/v1/seals/:seal
a seal as the index has it so far: indexed or not, with its order once it is
/v1/prices
the shared price snapshot every reference quote is worked out from
/v1/tokens
token list, searchable, an owner's balances first
/v1/solvers
leaderboard
/v1/solvers/:address
one solver's bond, bids and wins
/v1/fees
the fee PDA's balances
/v1/events
server-sent events: seal counts, phases, reveals, bids, clearings, settlements

2 Units

Amounts are integer atom strings with the token's decimals beside them. Prices are decimal strings in quote per base. Rounds are integers.

3 Errors

{ "error": { "code": "CHAIN_REFUSED", "message": "…", "retryable": false, "stage": "simulation" } }

Branch on code, show message, and retry when retryable says so.