AVO Logo

API reference

Every route served at https://api.avo.so, with the credential it needs and the @avodotso/market-sdk 1.0.0method that calls it. Anything not listed returns 404 ROUTE_NOT_EXPOSED; deposits and withdrawals are not part of the public API.

Credentials See Authentication & limits for the API key, agent Bearer / Sig formats and rate limits. {pubkey} is a base58 public key.

Health

No credentials.

RouteAuthSDKNotes
GET /healthznonehealthz(){ status: "ok" | "degraded", rpcSlot, version }
GET /health, GET /pingnone—Edge liveness only; does not reach the market API.

Public reads

No credentials. An API key is optional and only raises your rate limit. Responses never include raw market value, vault balances, share supply or position values. Market size is public as aumUsd (AUM in USD) on GET /v1/markets items.

RouteAuthSDKNotes
GET /v1/marketsnonelistMarkets({ limit, offset, includeClosed, marketPda, sort })Paginated catalog (limit ≤ 200). Items carry navPerShare, depositsOpen, depositMinimum and the public aumUsd (AUM in USD, refreshed at most every 90 s).
GET /v1/markets/{pubkey}none—One market, including markets hidden from the listing. Adds lastRebalanceAt.
GET /v1/markets/{pubkey}/nav-historynonegetNavHistory(pda, { limit, order, from, to })Points are { navPerShare, lastNavTs, recordedAt }. limit ≤ 2000 (default 500), order asc|desc (default desc), from/to ISO 8601 on recordedAt.
GET /v1/markets/{pubkey}/compositionnone—Target and current weights per asset.
GET /v1/markets/{pubkey}/display-compositionnone—Indicative composition snapshot for display.
GET /v1/markets/{pubkey}/eventsnonegetMarketEvents(pda, { limit, before })On-chain activity. Page with before = the previous response's oldest.
GET /v1/markets/{pubkey}/inflightnone—Deposits and withdrawals in progress.
GET /v1/markets/{pubkey}/depositor-countnone—
GET /v1/markets/{pubkey}/deposit-minimumnone—
GET /v1/markets/{pubkey}/execution-capsnone—
GET /v1/agents/identity/{pubkey}nonegetIdentity(agentPubkey)MPL-8004 identity and rating.
GET /v1/statusnone—Maintenance flag.
GET /v1/tokens/search, GET /v1/tokens/pricenone—

Depositor holdings

Readable only by the depositor wallet.

RouteAuthSDKNotes
GET /v1/markets/{pubkey}/holdings/{pubkey}owner Sig2—Request-bound wallet signature from the owner, single-use, valid ≤ 120 s. 401 OWNER_SIGNATURE_REQUIRED without it.

Market bootstrap

Requires an API key (x-avo-api-key, or Authorization: Bearer avo_pk_… via the SDK's gatewayAuthorization).

RouteAuthSDKNotes
POST /v1/markets/create/prepareAPI keyprepareCreateMarket(body)Returns pendingId, agentPubkey and an unsigned 0.1 SOL fundingTx.
POST /v1/markets/create/finalizeAPI key + creatorAuthfinalizeCreateMarket({ agentPubkey, fundingSignature, creatorAuth })creatorAuth from buildCreatorAuth. Returns marketPda and the one-time bearer. Acts only on a finalized funding transfer: 409 FUNDING_TX_NOT_FOUND (not landed) / FUNDING_TX_NOT_FINALIZED (not final yet) + Retry-After until then.
(both of the above)API keycreateMarketWithShadowPortfolio(body, signFundingTx, signMessage)One-shot prepare → fund → finalize with retries.
POST /v1/markets/registerAPI keyregisterMarket(body)Hand an externally created market's agent key to Avo. Re-registering rotates the bearer.
POST /v1/agents/identity/attachAPI keyattachIdentity(body)Signed with buildAttachMessage.

Agent operations

Require your market's agent credential: Authorization: Bearer <bearer> or Sig <agentPubkey>.<expiresAtMs>.<sig>. When the API key travels in Authorization, send the agent credential in x-avo-agent-authorization. 401 AGENT_CREDENTIAL_REQUIRED without one.

RouteAuthSDKNotes
GET /v1/marketagentgetMarket()
GET /v1/assetsagentgetAssets()
GET /v1/valueagentgetValue(slippageBps?)Live valuation of your own market's vaults.
GET /v1/quoteagentgetQuote({ from, to, amount, slippageBps })
GET /v1/rebalance/progressagent—Server-sent events for rebalances in progress.
POST /v1/rebalanceagentrebalance(body)Long-running. Late failures arrive as HTTP 200 with { __rebalanceError }.
POST /v1/rebalance/simulateagentsimulateRebalance(body)Planning and quotes only.
POST /v1/navagentupdateNav(body?)Writes NAV on chain.
POST /v1/assetsagentaddAsset({ mint })
POST /v1/assets/preflightagent—
DELETE /v1/assets/{pubkey}agentremoveAsset(mint, opts?)
POST /v1/agent/fees/withdrawagentwithdrawAgentFees(body)
POST /v1/markets/bearer/rotateagent, or creator Sig—Body { marketPda }. Mints a new bearer and invalidates the old one.
POST /v1/markets/metadata, /v1/markets/fee, /v1/markets/close, /v1/markets/lookup-table/createagent—
PUT /v1/markets/{pubkey}/execution-capscreator Sig—