API overview
Authentication, base URL, and the integration pattern for the Aqua0 REST API.
Aqua0 is liquidity infrastructure for stablecoin issuers. A single locked-liquidity position backs liquidity across multiple pools and chains at once, far more capital-efficient than traditional AMMs.
The Aqua0 REST API is the backend integration path. Use it when you are building server-side, running a custody wallet, or need direct control over transaction signing and submission. It is served over HTTPS, accepts and returns JSON, and is authenticated with an API key passed in a request header.
Base URL
https://api.aqua0.xyzAll endpoint paths below are relative to this base URL. This page (and every "Try it" panel) always points at the same backend this docs build was generated from, so a staging deployment of these docs shows the staging API here, not production.
Authentication
Pass your API key in the X-API-Key header on every request.
curl "https://api.aqua0.xyz/api/swap/quote?chainId=84532" \ -H "X-API-Key: $AQUA0_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "venue": "aqua", "order": { "maker": "0x...", "traits": "0", "data": "0x" }, "tokenIn": "0x...", "tokenOut": "0x...", "amountIn": "1000000", "takerData": "0x" }'A missing or invalid key returns 401 Unauthorized.
Getting an API key
Keys are provisioned directly by the team. Each endpoint page below has a "Try it" panel wired to the live API for this docs deployment through a same-origin proxy (no CORS setup needed on your end).
Endpoint paths
All routes are mounted flat under /api/*, for example /api/swap/quote or /api/vaults/chains.
Trader swaps live under one namespace, /api/swap/*, with a venue field in the request body
selecting the fill path, aqua for a 1inch Aqua strategy fill and v4 for a Uniswap V4 fill. Both
are just-in-time (JIT) liquidity fills against Aqua0's vaults.
Integration pattern
- Quote means requesting an indicative quote for a swap (
POST /api/swap/quote). - Prepare or authorize covers two paths. For the
aquavenue, get the calldata to execute (POST /api/swap/prepare). For thev4venue, get a signed JIT authorization (POST /api/swap/authorize). - Sign and submit means your application or the user's wallet signs and broadcasts the transaction, and Aqua0 never holds private keys or takes custody.
- Track means polling status to completion. See Status & errors.
Custody model
- You (or your application's wallet) hold the private keys and sign every transaction.
- You submit and broadcast the signed transaction yourself; funds stay in your custody throughout.
Errors
Every error response is JSON with the same shape.
{
"error": "VALIDATION_ERROR",
"message": "Invalid request data",
"details": { "...": "optional, present on some error codes" }
}error is a stable machine-readable code (VALIDATION_ERROR, UNAUTHORIZED, NOT_FOUND,
CHAIN_NOT_SUPPORTED, INSUFFICIENT_BALANCE, SIMULATION_REVERTED, INTERNAL_SERVER_ERROR, and
others per endpoint). Branch your error handling on error, not on message, which is meant for
logs and humans and can change wording between releases.
| Status | Meaning | Retry? |
|---|---|---|
400 | Malformed or invalid request body/params | No, fix the request |
401 | Missing or invalid X-API-Key | No, fix the credential |
403 | Key valid but not permitted for this route | No |
404 | Resource (order, position, request id, ...) not found | No |
422 | Request was well-formed but the underlying transaction would revert (SIMULATION_REVERTED) | No, the details explain why, re-quote instead |
500 | Unexpected server error | Yes, with backoff |
Quote and prepare requests are safe to retry as-is, since they do not mutate state.
Live networks
Aqua0's mainnet-beta targets six chains, Base, Avalanche, Arbitrum, Celo,
Monad, and Robinhood. Check GET /api/vaults/chains for the exact set of chains the running
API currently serves. That endpoint, not this page, is the always-current source.
Status & errors
How to track swaps safely and what to do when things fail.
Get a cross-chain front by its frontId
Returns one cross-chain front as a single row joining the source lock/commit/release on chain A to the destination landing credit on chain B (frontId is the cross-chain join key). The destination fields stay null until the landing is credited, which is the in-flight state the UI shows. Path parameter: frontId (32-byte hex), required.