Skip to main content
GET
/
swap
/
v1
/
{chainId}
/
approve
/
allowance
Check token allowance
curl --request GET \
  --url https://api.akka.finance/swap/v1/{chainId}/approve/allowance \
  --header 'apikey: <api-key>'
{
  "allowance": "0"
}

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.

When to use

Call this before swapping an ERC-20 token to check if the AKKA Router already has sufficient spending approval:
const { allowance } = await response.json();
const swapAmount = BigInt('1000000000000000000');

if (BigInt(allowance) < swapAmount) {
  // Need to approve first — call /approve/transaction
} else {
  // Allowance sufficient — proceed to /swap
}
For native tokens (HYPE), allowance is always unlimited. You can skip the allowance check and go directly to the swap.

Authorizations

apikey
string
header
required

API key for authentication. Contact AKKA on Telegram to obtain your key.

Path Parameters

chainId
enum<integer>
required

Blockchain chain ID

Available options:
999
Example:

999

Query Parameters

tokenAddress
string
required

Contract address of the token to check allowance for.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb"

walletAddress
string
required

Wallet address to check the allowance for.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0xD3C0F471488523b378F2D9C21939c97300c510F5"

Response

Allowance retrieved successfully

allowance
string
required

Number of tokens the AKKA Router is allowed to spend (in wei)

Example:

"0"