For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

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/chains

Every chain /v1/quote can route from or to.

Parameters

Name
Required
Description

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"
      }
    }
  ]
}
Field
Type
Description

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.

nativeToken

The chain's native token.

List tokens

The tokens that can be quoted, grouped by chain.

Parameters

Name
Required
Description

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

Name
Required
Description

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

Field
Type
Description

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

Status
Code
When

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.

429

RATE_LIMITED

See Errors for the envelope and all codes.

Last updated