999) — from checking allowance to executing the swap.
Prerequisites
- An API key (get one on Telegram)
- A wallet with tokens on HyperEVM
- Tokens to swap (this example swaps HYPE for UBTC)
Check allowance
Before swapping an ERC-20 token, check if the AKKA Router is allowed to spend it. For native token swaps (HYPE), skip to step 3.Response:If
allowance is 0 or less than your swap amount, proceed to step 2. Otherwise, skip to step 3.Approve token spending
Generate and submit an approval transaction so the AKKA Router can spend your tokens.Response:
Next steps
Full Working Example
Complete TypeScript implementation you can copy and run.
API Reference
Explore all endpoints with the interactive playground.
