Non-custodial by design
v2 does not hold user keys or funds:- Returns unsigned transactions for wallets or your custody layer to sign
- Reads public on-chain state when portfolio and analytics endpoints are enabled
- Never asks end users for seed phrases or private keys
B2B2C model
Discovery vs live operations
| Class | Behavior | Examples |
|---|---|---|
| Catalog | Structured lists; may include preview metrics | GET /v2/pools, GET /v2/vaults |
| Analytics | Time series and positions (indexed/on-chain) | GET /v2/pools/{poolId}/tvl, /apr |
| Mutations | Quote then action with unsigned txs | Swap, LP add/remove, vault deposit/withdraw |
503 provider_unavailable — not synthetic data.
Quote → action → broadcast
Quote tokens
Quotes return aquoteId — a short-lived signed token, not a server session id:
- Contains quote summary and expiry
- Typically valid for a few minutes
- Same token can be exchanged for an action while valid
GET /v2/swaps/quote/{quoteId}decodes a swap quote for display
Actions
An action packages one or more unsigned transactions:Resource identifiers
| Resource | ID format | Example |
|---|---|---|
| Network | slug | polygon, base |
| Pool | {chainId}:{address} | 137:0x4Af62… |
| Vault | {chainId}:{address} | 8453:0x09C0… |
| Quote | signed token | eyJ… |
| Action | string | often the quote token in early releases |
Pools and vaults
Pools are liquidity venues (DEX LP). Integrators can:- List pools and filter by network, protocol, or token
- Read APR, TVL, volume, and fees (live indexing rolling out)
- Add or remove liquidity via quote → action (rolling out)
- List vaults with strategy name, asset, preview APY, and risk score
- Deposit and withdraw via quote → action (rolling out)
Providers
GET /v2/providers lists which product backends power each capability (swap routing, pool reads, vault actions, bridges). The enabled flag reflects what is active in the current API deployment — not something you configure per request.
Errors
All errors share one envelope:| HTTP | code | Meaning |
|---|---|---|
| 400 | invalid_request | Malformed request |
| 422 | validation_error | Invalid parameters |
| 404 | not_found | Unknown quote, pool, or action |
| 429 | rate_limit_exceeded | Too many requests |
| 503 | provider_unavailable | Feature not enabled yet |
| 502 | upstream_error | Temporary routing or pricing failure |
X-Request-ID. Pass it when contacting support.