Skip to main content
GET
/
v1
/
allowance
Check ERC20 token allowance
curl --request GET \
  --url https://api.hypermid.io/v1/allowance \
  --header 'X-API-Key: <api-key>'
{
  "data": {
    "chainId": 8453,
    "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "owner": "0x1234567890abcdef1234567890abcdef12345678",
    "spender": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
    "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
    "isApproved": true
  },
  "error": null,
  "meta": {
    "requestId": "uuid",
    "timestamp": 1711234572
  }
}
Checks the ERC20 token allowance for a given owner and spender address on an EVM chain. This is used to determine if a token approval transaction is needed before executing a swap. For native tokens (ETH, PLS, etc.), returns max uint256 since native tokens don’t require approval.
chainId
number
required
Chain ID (e.g. 1 for Ethereum, 8453 for Base, 369 for PulseChain)
token
string
required
ERC20 token contract address. Use 0x0000000000000000000000000000000000000000 for native tokens.
owner
string
required
Wallet address that owns the tokens
spender
string
required
Contract address that is approved to spend tokens (e.g. bridge or DEX router contract)
{
  "data": {
    "chainId": 8453,
    "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "owner": "0x1234567890abcdef1234567890abcdef12345678",
    "spender": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
    "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
    "isApproved": true
  },
  "error": null,
  "meta": {
    "requestId": "uuid",
    "timestamp": 1711234572
  }
}

Supported Chains

Supports 20+ EVM chains including Ethereum, Arbitrum, Base, Polygon, Optimism, PulseChain, and more. Non-EVM chains (Solana, Bitcoin, TON, etc.) do not have ERC20 allowances and will return an error.

Notes

  • Native tokens always return max allowance and isApproved: true
  • Uses public RPCs with environment variable overrides (RPC_{chainId})
  • The allowance value is returned as a string (raw wei value)

Authorizations

X-API-Key
string
header
required

Partner API key. Optional for public endpoints, required for /v1/partner/*.

Query Parameters

chainId
number
required

Chain ID (e.g. 1, 8453, 369)

token
string
required

ERC20 token contract address

owner
string
required

Wallet address that owns the tokens

spender
string
required

Contract address that is approved to spend

Response

Allowance information

data
object