API
The public Amoeba API at https://api.amoeba.farm is a Lean-backed Edge service for current Devnet reads, semantic transaction preparation, bounded relay, and status. It serves only the pinned Spread RC41 deployment.
Response contract
Section titled “Response contract”Successful protocol routes use:
{ "ok": true, "data": { "protocol": { "programId": "...", "namespace": "ameba-spread-v2", "cluster": "devnet", "releaseTag": "v0.1.0-rc.41", "releaseCommit": "deca99b..." } }}Errors use:
{ "ok": false, "code": "ERROR_CODE", "message": "Human-readable message." }Atomic strikes, prices, amounts, counters, and timestamps that can exceed safe JavaScript integer precision cross the boundary as canonical unsigned decimal strings.
Identity and readiness
Section titled “Identity and readiness”| Route | Purpose |
|---|---|
GET /healthz |
Process health. It is not market readiness. |
GET /readyz |
Current deployment, market, pool, and RPC-backed readiness. |
GET /chain/identity |
Finalized Devnet genesis, Program/ProgramData, artifact, collateral, and Light-program identity. |
GET /dlmm/program-registry |
Current program registry. |
GET /dlmm/markets |
Current Market and pool projections. |
A healthy process or matching program does not prove that a particular pool or sleeve is active.
Writer reads
Section titled “Writer reads”GET /dlmm/writer-sleeves?owner=:ownerGET /dlmm/writer-sleeves/:sleeveGET /dlmm/writer-sleeves/:sleeve/policy-auditGET /dlmm/writer-sleeves/close-requests/:requestWriter account reads use strict SDK decoders for exact owners, lengths, bumps, versions, and embedded identities.
Writer and Flat preparation
Section titled “Writer and Flat preparation”The public Edge accepts semantic intent only:
POST /dlmm/writer-sleeves/deposits/preparePOST /dlmm/writer-sleeves/bids/preparePOST /dlmm/writer-sleeves/closes/previewPOST /dlmm/writer-sleeves/closes/preparePOST /dlmm/writer-sleeves/claims/preparePOST /dlmm/writer-sleeves/flat-transfers/prepareCallers cannot supply PDAs, account metas, reserve candidate points, auction fill sets, or proof-derived values. Responses include Lean admission, exact protocol identity, a finalized observation, and a portable SDK operation plan.
Collective secondary trading
Section titled “Collective secondary trading”POST /dlmm/trades/prepare accepts only:
{ "owner": "wallet pubkey", "market": "Market pubkey", "direction": "quote-for-option", "amountIn": "1000000", "minimumAmountOut": "1", "limitBinId": 0}Direction can also be option-for-quote. The Edge derives the group, sleeve, book, pool, vaults, and route pages from finalized state. Spread’s pinned package computes the native route; Node and Lean do not maintain a competing price formula.
Signed submission and status
Section titled “Signed submission and status”Wallet software validates and independently re-observes the plan before signing. It submits ordered batches through:
POST /dlmm/writer-sleeves/submitGET /dlmm/writer-sleeves/status/:operationIdPOST /dlmm/trades/submitGET /dlmm/trades/status/:operationIdEach batch is ordered and single-use. Changed instruction bytes, metas, writable accounts, signer coverage, observation facts, or deployment identity fail closed.
Pure writer specifications
Section titled “Pure writer specifications”The public Edge also exposes proof-backed, non-authoritative calculation routes:
POST /writer-sleeves/validatePOST /writer-sleeves/reservePOST /writer-sleeves/auction-planPOST /writer-sleeves/close-previewPOST /writer-sleeves/settlement-planPOST /writer-sleeves/metricsPOST /writer-sleeves/securityThese routes can propose or explain a result. Spread still recomputes or verifies every result that can move money or change liabilities.
Other current reads
Section titled “Other current reads”Current market, oracle, settlement, collateral, ledger, and position reads remain under their documented /dlmm/* families. GET /futures/ticker and GET /lithos/links are bounded cached presentation feeds; they never determine a Spread price, reserve, liability, admission, or transaction.
For exact client-side reconstruction, read SDK and Authority Boundaries.

