Avo Public API
Avo is on-chain portfolio infrastructure. This API is the fastest path to launching, operating, and monetizing a Solana portfolio without writing a Solana program.
What this API gives you
- Create a portfolio — pick a base asset, target tokens, and starting weights; the API mints the on-chain market, registers the assets, and hands you a bearer token to operate it.
- Rebalance — POST a new weight vector; Avo routes each leg's swap (dflow, Jupiter or Titan), settles NAV, and mirrors the change to the shadow portfolio your followers see.
- Read state — NAV per share, per-asset weights, on-chain activity, and (with agent auth) your market's live value.
- Charge a fee — every deposit, withdrawal, and rebalance pays your creator fee to a Solana wallet you set. No claim step.
https://api.avo.soTwo ways to build
API-only (recommended for most). Send HTTP requests from any language. No SDK, no keypair on your machine. See the Quickstart for a working ~50-line script.
SDK (TypeScript). Type-safe wrapper around the same endpoints, plus helpers for wallet-side signing of the funding tx at market creation. See Build on-chain.
Both paths hit the same API. The SDK is convenience, not a moat — you can drop to raw HTTP any time.
Getting Started
The API is currently available under controlled access. Keys (avo_pk_…) are issued by the Avo team; to request one, open a ticket on Discord.
Public reads (list markets, NAV history, composition, events) need no auth. Agent-scoped endpoints (rebalance, update NAV, add/remove assets, live value) accept either:
- Bearer token — the one-time bearer returned by
POST /v1/markets/create/finalize. Valid until you rotate it. Recommended. - Signed request — you sign a canonical string with the agent's keypair. Use this when you self-custody.
Authorization: Bearer <your-token>See Authentication & limits for the API-key header and rate limits.
curl https://api.avo.so/healthzThen follow the Quickstart to launch and rebalance a portfolio in one script.
GET /healthz, GET /v1/markets, GET /v1/markets/{marketPda} and its /nav-history, /composition and /events sub-routes, and GET /v1/agents/identity/{agentPubkey} don't require auth. Public responses never include raw market value, vault balances or share supply; use navPerShare. Market size is public as aumUsd (AUM in USD) on GET /v1/markets items. Anonymous calls are rate-limited per IP. See the API reference for every route.Authentication & limits
API key. Send your key as x-avo-api-key. It is required for the market-bootstrap calls (POST /v1/markets/create/prepare, /v1/markets/create/finalize, /v1/markets/register, /v1/agents/identity/attach) and optional on reads, where it moves you from the anonymous per-IP limit to your key's own limit.
x-avo-api-key: avo_pk_…Agent auth. Agent-scoped endpoints authenticate the market's agent with one of:
Authorization: Bearer <custodial bearer>
Authorization: Sig <agentPubkey>.<expiresAtMs>.<signatureBase58>A Sig token is an Ed25519 signature by the agent key over avo-portfolio-api/v1\n<agentPubkey>\n<expiresAtMs>, with a short expiry. The SDK builds it for you when you pass agent: { publicKey, secretKey } (or { publicKey, signer }).
If your client can only set Authorization, send the API key there as Authorization: Bearer avo_pk_… and move the agent credential to x-avo-agent-authorization. This is what the SDK's gatewayAuthorization option does:
import { MarketClient } from '@avodotso/market-sdk';
const client = new MarketClient({
services: { avoApi: 'https://api.avo.so' },
gatewayAuthorization: 'Bearer avo_pk_…', // your API key
agent: { bearer }, // your market's bearer
});Rate limits. Limits are per minute. Without an API key they apply per IP and per route class: public reads 120, agent reads 120, agent writes 20, market bootstrap 5. With a key they apply per key: 600 by default (or your key's own limit), within which agent writes are capped at 120 and bootstrap at 30. These are current defaults and may change; read the x-ratelimit-limit, x-ratelimit-remaining and x-ratelimit-reset response headers instead of hard-coding them. Over the limit, the API answers 429 RATE_LIMITED with a Retry-After header (seconds). Wait that long before retrying, and back off on repeated 429s.
Errors. Errors are JSON: { "error": { "code", "message" } }. A path that isn't part of the public API returns 404 ROUTE_NOT_EXPOSED; a wrong method on a public path returns 405.
Downloads
- TypeScript SDK on npm (
@avodotso/market-sdk1.0.0)
