Skip to content

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.

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.

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.

GET /dlmm/writer-sleeves?owner=:owner
GET /dlmm/writer-sleeves/:sleeve
GET /dlmm/writer-sleeves/:sleeve/policy-audit
GET /dlmm/writer-sleeves/close-requests/:request

Writer account reads use strict SDK decoders for exact owners, lengths, bumps, versions, and embedded identities.

The public Edge accepts semantic intent only:

POST /dlmm/writer-sleeves/deposits/prepare
POST /dlmm/writer-sleeves/bids/prepare
POST /dlmm/writer-sleeves/closes/preview
POST /dlmm/writer-sleeves/closes/prepare
POST /dlmm/writer-sleeves/claims/prepare
POST /dlmm/writer-sleeves/flat-transfers/prepare

Callers 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.

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.

Wallet software validates and independently re-observes the plan before signing. It submits ordered batches through:

POST /dlmm/writer-sleeves/submit
GET /dlmm/writer-sleeves/status/:operationId
POST /dlmm/trades/submit
GET /dlmm/trades/status/:operationId

Each batch is ordered and single-use. Changed instruction bytes, metas, writable accounts, signer coverage, observation facts, or deployment identity fail closed.

The public Edge also exposes proof-backed, non-authoritative calculation routes:

POST /writer-sleeves/validate
POST /writer-sleeves/reserve
POST /writer-sleeves/auction-plan
POST /writer-sleeves/close-preview
POST /writer-sleeves/settlement-plan
POST /writer-sleeves/metrics
POST /writer-sleeves/security

These routes can propose or explain a result. Spread still recomputes or verifies every result that can move money or change liabilities.

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.