Quickstart
Get an API key and quote your first swap, on any chain.
The Aqua0 REST API quotes and builds swaps on every chain and venue Aqua0 serves, EVM chains and Solana alike. You sign and send every transaction yourself.
1. Get an API key
Sign in on the API keys page and create a key. Send it in the X-API-Key header.
export AQUA0_API=https://api.aqua0.xyzexport AQUA0_API_KEY=<your key>2. Pick a chain and two tokens
curl "$AQUA0_API/api/vaults/chains" -H "X-API-Key: $AQUA0_API_KEY"
curl "$AQUA0_API/api/vaults?chainId=8453" -H "X-API-Key: $AQUA0_API_KEY"Every chain has a numeric chainId, for example 8453 for Base and 1151111081099710 for Solana. Each asset vault's
asset is a token you can swap: a 0x address on an EVM chain, or a base58 mint on Solana.
3. Quote a swap
Sell 1 USDC for WETH on Base:
curl -X POST "$AQUA0_API/api/swap/quote" \
-H "X-API-Key: $AQUA0_API_KEY" -H "Content-Type: application/json" \
-d '{
"chainId": 8453,
"tokenIn": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"tokenOut": "0x4200000000000000000000000000000000000006",
"amountIn": "1000000"
}'Amounts are strings in the token's smallest unit, so 1 USDC, which has 6 decimals, is "1000000". On Solana, send
"chainId": 1151111081099710 and the two mints.
routes lists every venue that can fill the swap, best first, and best names the one that pays the most. Each route
has its venue id, a venueInfo with the venue's name and logo, amountOut and minAmountOut.
Next
- Swap: build, sign and send the swap you quoted.
- Track a swap until it settles.
- API Reference for every endpoint.