DEX Aggregator API
The HyperFlow DEX Aggregator API gives you the same routing engine that powers hyperflow.fun: quote the best route across the liquidity sources of each supported chain, then execute through the HyperFlow router contract. Wallets and apps can also charge their own fee on top of each swap — see Integrator fee.
Supported chains
Each chain has its own base URL. The endpoints, parameters and responses are identical; only the base URL changes.
All endpoints serve mainnet only; there is no public testnet environment.
Elysium is an L2 on HyperEVM with HYPE as its gas token. Public RPC: https://rpc.elysium.kinetiq.xyz. Explorer: elysium.kinetiq.xyz.
List liquidity sources
Returns the DEX ids available on that chain, for use in exchanges and excludedExchanges:
Authentication & rate limits
Requests can be authenticated with an API key passed in the x-api-key header:
The limit applies to /quote and /swap. To obtain an API key, or if your bot, solver or vault needs more than 25 requests/second, reach out to the HyperFlow team on Discord.
Keep your API key on your backend. A key shipped in a web or mobile app can be read by anyone and used against your rate limit.
When you hit the limit
Requests over the limit return HTTP 429 with:
The response does not say when to retry. Back off and retry with an increasing delay plus random jitter (for example 250 ms, 500 ms, 1 s, …), and avoid retrying in a tight loop.
Get a quote
Retrieves the optimal trading route and price quote between two tokens.
Parameters
Response
priceImpactPercent is in percent, excludes any integrator fee, and is negative when the route loses value.
Example: 1 WHYPE to USDC on HyperEVM, routed in two hops:
Get swap data
Generates the transaction data needed to execute the swap through the router contract.
Parameters
All Quote parameters, plus:
Response
/swap wraps the quote:
Approve tx.router for tokenIn (ERC-20 inputs), then send tx.data to tx.router — attaching value = amountIn for native-token input.
Always use the tx.router returned with each response; never hardcode it. Swaps with an integrator fee go through the integrator-fee router, swaps without one through the standard router (see Smart Contracts).
Integrator fee
Wallets, apps and bots can charge their own fee on swaps they route through HyperFlow. The fee is paid to your address in the same transaction as the swap — there is nothing to claim.
- Set
feeBps(maximum100, i.e. 1%) andfeeReceiveron/swap. On/quote,feeBpsalone is enough to preview the fee. - The fee is taken from the output token, as a share of the routed output.
amountOutandminAmountOutare already net of the fee, so what your user sees and signs matches what they receive.- Without
feeBps, swaps work exactly as before.
Example: feeBps=50 on a swap routing 5,869.81 USDC out:
Your user receives 5,840.46 USDC and 0xYourFeeAddress receives 29.35 USDC (0.5% of 5,869.81).
Code example
Errors
Client errors return a 4xx status with the reason in the body; only faults on our side return 5xx. Most errors are {"error": "<message>"}; a malformed value returns {"errors": [{"field": "...", "message": "..."}]}.
Resources
- Swagger reference: HyperEVM · Elysium — OpenAPI JSON for code generation and agents: HyperEVM · Elysium
- Building an AI agent, or a bot that swaps for users? Follow the Agent Swap Guide
- Swapping from a vault or contract? See Swapping from Contracts
- What changed and when: API Changelog
- Router contract addresses
- Earn bonus points for your users via the Points Integration
- Bridging across chains? See the Bridge Integration