Skip to main content

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.

The most common reasons:
  1. Slippage exceeded — The price moved between quoting and execution. Increase your slippage tolerance or retry with a fresh swap call.
  2. Stale transaction — Too much time passed between getting the swap data and broadcasting. Re-fetch from /swap and try again.
  3. Insufficient allowance — The token wasn’t approved, or the approval hasn’t confirmed yet. Check with /approve/allowance before swapping.
  4. Insufficient balance — The wallet doesn’t have enough tokens to cover the swap amount plus gas.
In all revert cases, no tokens are lost — you only pay the gas fee for the failed transaction.
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.
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.
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.
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}/tokens to fetch all tokens in one call instead of individual lookups
Currently HyperEVM (chain ID 999) is the only supported chain. Ethereum, Arbitrum, and Base are coming soon.See Supported Chains for details.
  • /quote returns the expected output amount and optional route/gas info. It’s read-only — use it to display prices to the user.
  • /swap returns everything from /quote plus a ready-to-sign transaction object (tx). Use it when the user is ready to execute.
Typical flow: show the user a quote as they type, then call /swap only when they click the swap button.
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.
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.
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.
Contact the AKKA team on Telegram to request an API key. The key is passed as an apikey header on every request.
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 /quote at intervals and execute /swap when 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.
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.