Chains & Tokens
The catalog endpoints list what /v1/quote can route: the supported chains, and the tokens on each. They need no integrator and no API key (send your key anyway from servers, to use your key's rate limits).
Chains and tokens change rarely — cache the responses for a few minutes rather than fetching them per request.
List chains
GET /v1/chainsEvery chain /v1/quote can route from or to.
Parameters
ecosystems
no
Comma-separated ecosystems to return, case-insensitive: evm, solana. An unknown value is rejected with 400 VALIDATION_ERROR.
Response
{
"chains": [
{
"id": "8453",
"key": "base",
"ecosystem": "evm",
"name": "Base",
"coin": "ETH",
"mainnet": true,
"logoURI": "https://deposit.swapper.finance/assets/chains/base.webp",
"nativeToken": {
"address": "0x0000000000000000000000000000000000000000",
"chainId": "8453",
"symbol": "ETH",
"decimals": 18,
"name": "Ether",
"logoURI": "https://deposit.swapper.finance/assets/tokens/eth.webp",
"priceUSD": "2500.12"
}
}
]
}id
string
Swapper's chain id, the same id the deposit widget uses: e.g. "8453" (Base), "42161" (Arbitrum), "mainnet-beta" (Solana). Always a string.
key
string
Lowercase chain key (e.g. base, arbitrum, solana). Anywhere a chain is expected, you can pass the id or the key.
ecosystem
string
evm or solana.
name
string
Display name.
coin
string
Native token symbol.
mainnet
boolean
Whether the chain is a mainnet.
logoURI
string
Chain logo.
List tokens
The tokens that can be quoted, grouped by chain.
Parameters
chains
no
Comma-separated chain ids or keys, at most 50 (e.g. 8453,arbitrum). Defaults to every supported chain.
ecosystems
no
Comma-separated ecosystems (evm, solana), case-insensitive. Ignored when chains is given.
depositAddress
no
true: only the tokens that can fund a deposit address, on the chains that accept any. Defaults to false.
Response
tokens maps each chain id (as a string) to its tokens:
Get one token
Look up a single token by address or symbol.
Parameters
chain
yes
Chain id or key.
token
yes
Token address (any case on EVM) or symbol (case-insensitive).
Response
A single Token. A token the chain doesn't list returns 404 with the code UNSUPPORTED_TOKEN:
The token object
address
string
Token address. Native tokens: 0x0000000000000000000000000000000000000000 on EVM, So11111111111111111111111111111111111111111 on Solana.
chainId
string
Swapper chain id, e.g. "8453".
symbol
string
Token symbol.
decimals
integer
Decimals — amounts are integers in units of 10^-decimals.
name
string
Token name.
logoURI
string
Token logo; empty when unknown.
priceUSD
string
USD price as a decimal string; "0" when unknown.
Errors
400
VALIDATION_ERROR
A parameter is malformed (e.g. an unknown ecosystem).
400
UNSUPPORTED_CHAIN
A chain in chains or chain isn't served by v1.
404
UNSUPPORTED_TOKEN
/v1/token: the chain doesn't list the token.
401
INVALID_API_KEY
An unknown or revoked API key was sent.
See Errors for the envelope and all codes.
Last updated