Documentation Index
Fetch the complete documentation index at: https://docs.akka.finance/llms.txt
Use this file to discover all available pages before exploring further.
Why did my swap revert?
Why did my swap revert?
The most common reasons:
- Slippage exceeded — The price moved between quoting and execution. Increase your slippage tolerance or retry with a fresh swap call.
- Stale transaction — Too much time passed between getting the swap data and broadcasting. Re-fetch from
/swapand try again. - Insufficient allowance — The token wasn’t approved, or the approval hasn’t confirmed yet. Check with
/approve/allowancebefore swapping. - Insufficient balance — The wallet doesn’t have enough tokens to cover the swap amount plus gas.
What is the native token address?
What is the native token address?
Use
0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee to represent the chain’s native token (HYPE on HyperEVM). This is a convention shared across most DEX aggregators.Native tokens don’t need approval — skip the allowance check when swapping from HYPE.How fresh are token prices?
How fresh are token prices?
Prices in the token endpoints (
buyPriceUsd, sellPriceUsd) are refreshed every ~5 seconds from actual DEX pool reserves. For most use cases, polling every 15–30 seconds is sufficient.See the Price API guide for a polling pattern with local caching.Do I need to approve tokens every time I swap?
Do I need to approve tokens every time I swap?
No. The default approval sets an unlimited allowance for the AKKA Router contract. Once approved, you can swap that token as many times as you want without re-approving.Always call
/approve/allowance first to check — if the allowance is already sufficient, skip the approval step.What is the rate limit?
What is the rate limit?
20 requests per 60 seconds per IP address. If you exceed this, the API returns HTTP 429.Tips to stay within limits:
- Debounce user input (400ms+) before fetching quotes
- Cache token lists — they don’t change frequently
- Use
GET /{chainId}/tokensto fetch all tokens in one call instead of individual lookups
Which chains are supported?
Which chains are supported?
Currently HyperEVM (chain ID 999) is the only supported chain. Ethereum, Arbitrum, and Base are coming soon.See Supported Chains for details.
What's the difference between /quote and /swap?
What's the difference between /quote and /swap?
/quotereturns the expected output amount and optional route/gas info. It’s read-only — use it to display prices to the user./swapreturns everything from/quoteplus a ready-to-sign transaction object (tx). Use it when the user is ready to execute.
/swap only when they click the swap button.What does the from parameter do on /swap?
What does the from parameter do on /swap?
The
from parameter is the wallet address that will execute the transaction. It’s optional — if omitted, the API builds the transaction without a from field, and your wallet/library will fill it in when signing.Providing from allows the API to do balance and allowance pre-checks and return more accurate gas estimates.Can I set a custom gas price?
Can I set a custom gas price?
Yes. The
/swap endpoint accepts optional gasPrice and gasLimit parameters. If omitted, the API uses current network values.On HyperEVM, gas prices are low and stable — the API defaults are usually fine. Only override if you have a specific reason.What is encodedTx in the swap response?
What is encodedTx in the swap response?
encodedTx is the full transaction tuple (from, to, data, value, gasPrice, gas) ABI-encoded as a hex string. It allows frontends to decode and execute the swap without needing the router contract ABI.Most integrations use the tx object directly — encodedTx is an alternative for advanced use cases.How do I get an API key?
How do I get an API key?
Contact the AKKA team on Telegram to request an API key. The key is passed as an
apikey header on every request.Can I use AKKA for limit orders or DCA?
Can I use AKKA for limit orders or DCA?
The API provides instant swap execution, not scheduled orders. However, you can build limit orders or DCA on top of the API:
- Limit orders: Poll
/quoteat intervals and execute/swapwhen the rate hits your target. See the Node.js guide for a price monitoring example. - DCA (Dollar Cost Averaging): Run a cron job or interval that executes a fixed swap at regular intervals.
What pool types does AKKA aggregate?
What pool types does AKKA aggregate?
AKKA indexes liquidity from 20+ DEX pool types on HyperEVM, including Uniswap V2/V3 forks, Algebra, Curve, Balancer, and more. The pathfinder algorithm evaluates all pools to find the optimal route — including splitting across multiple pools when that gives a better rate.Use
/dex-compare to see how the aggregated rate compares to individual DEX pools.