Developer quickstart
The fastest way to integrate Aqua0.
What you can do
As an integrator, you can:
- Request quotes for SwapVM swaps and authorize V4 JIT trades
- Execute swaps through the AquaSwapVMRouter (single-chain) or via a Uniswap V4 hook (single-chain or cross-chain)
- Manage LP deposits and withdrawals through prepared calldata endpoints
- Track swap and withdraw lifecycle through poll endpoints
All endpoints require the X-API-Key header (matches the API's API_KEY env). Internal admin routes additionally require basic auth.
Single-chain SwapVM trader
POST /api/v1/swaps/quote
POST /api/v1/swaps/prepare/quote sizes the trade. /prepare returns calldata for AquaSwapVMRouter.swap(order, tokenIn, tokenOut, amountIn, takerData). Submit the prepared transaction yourself.
The router emits Swapped(orderHash, maker, taker, tokenIn, tokenOut, amountIn, amountOut) on success. The backend's swapvm-attribution.service.ts poller indexes this event and credits LP overlays in the brain DB; no further client action is required.
V4 JIT trader (single-chain or cross-chain)
POST /api/v2/jit/authorizeReturns an EIP-712-signed JITPayload. Submit a Uniswap V4 swap with the payload as hookData. Aqua0Hook.beforeSwap validates against the SLP's backendSigner and injects a temporary range; Aqua0Hook.afterSwap settles and emits SwapSettled.
For cross-chain trades, the payload references chain-A LP capital backing a chain-B swap. The repayment-worker then drains the source LP and delivers tokens to the destination SLP via LayerZero OFT. No client action is required after the swap lands.
Liquidity provider: deposit
POST /api/v2/slp/prepare-depositReturns calldata for slp.deposit(token, amount). ERC-20 approval to the SLP must already be in place; you can request approval calldata via the LP routes if needed.
Liquidity provider: withdraw
POST /api/v2/slp/prepare-withdraw # ERC-20 withdraw
POST /api/v2/slp/prepare-withdraw-eth # native-asset variant
GET /api/v2/slp/withdraw-requests/:requestIdWithdraws are signed by the backend after the brain reconciles obligations. prepare-withdraw queues the request and returns a requestId. Poll withdraw-requests/:requestId until it reports the signed payload, then submit the on-chain slp.withdraw(...) call yourself.
Full route surface
The full request/response surface is auto-generated by hono-openapi and served at GET /openapi.json on the running API. Use that as the canonical reference; this page documents the endpoints integrators reach for first.
Next steps
- Read Concepts for the SLP, strategy, and attribution model.
- Read Integration for recommended UX patterns.
- Read Status and errors for lifecycle states and retry guidance.