Aqua0
API Reference

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

All 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

  1. Quote means requesting an indicative quote for a swap (POST /api/swap/quote).
  2. Prepare or authorize covers two paths. For the aqua venue, get the calldata to execute (POST /api/swap/prepare). For the v4 venue, get a signed JIT authorization (POST /api/swap/authorize).
  3. 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.
  4. 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.

StatusMeaningRetry?
400Malformed or invalid request body/paramsNo, fix the request
401Missing or invalid X-API-KeyNo, fix the credential
403Key valid but not permitted for this routeNo
404Resource (order, position, request id, ...) not foundNo
422Request was well-formed but the underlying transaction would revert (SIMULATION_REVERTED)No, the details explain why, re-quote instead
500Unexpected server errorYes, 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.

On this page