LogoLogo
SwapKit's websiteRegister for an API Key
  • 🏡Getting started
    • SwapKit's trade offerings
  • 💰Monetization
  • 🤝Partnership
  • SwapKit API
    • Introduction
    • /providers - Request supported chains by a swap provider
    • /tokens - Request supported tokens by a swap provider
    • /quote - Request a trade quote
    • /quote - Understanding the response
    • /chainflip/broker/channel - Opening a Chainflip deposit channel
    • /track - Request the status of a swap
    • /screen - Check AML compliance
    • /price - Lookup token prices
Powered by GitBook
On this page
  • Example shortened response
  • Response fields
  • Notes
  1. SwapKit API

/tokens - Request supported tokens by a swap provider

The /tokens endpoint provides a list of tokens for a specified provider. This endpoint requires a query parameter to determine which provider's tokens you want to retrieve.

Method: GET URL: https://api.swapkit.dev/tokens

Example Request

curl -X 'GET' \
  'https://api.swapkit.dev/tokens?provider=CHAINFLIP' \
  -H 'accept: application/json' \
  -H "x-api-key: YOUR_VARIABLE_HERE"

Example shortened response

{
  "provider": "CHAINFLIP",
  "name": "CHAINFLIP",
  "timestamp": "2025-01-11T16:31:04.355Z",
  "version": {
    "major": 1,
    "minor": 0,
    "patch": 0
  },
  "keywords": [],
  "count": 10,
  "tokens": [
    {
      "chain": "BTC",
      "chainId": "bitcoin",
      "ticker": "BTC",
      "identifier": "BTC.BTC",
      "symbol": "BTC",
      "name": "Bitcoin",
      "decimals": 8,
      "logoURI": "https://storage.googleapis.com/token-list-swapkit/images/btc.btc.png",
      "coingeckoId": "bitcoin"
    },
    {
      "chain": "ARB",
      "chainId": "42161",
      "ticker": "ETH",
      "identifier": "ARB.ETH",
      "symbol": "ETH",
      "name": "Arbitrum Ether",
      "decimals": 18,
      "logoURI": "https://storage.googleapis.com/token-list-swapkit/images/arb.eth.png",
      "coingeckoId": "ethereum"
    },
    {
      "chain": "SOL",
      "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "chainId": "solana",
      "ticker": "USDC",
      "identifier": "SOL.USDC-EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "symbol": "USDC-EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "name": "Solana USDC",
      "decimals": 6,
      "logoURI": "https://storage.googleapis.com/token-list-swapkit/images/sol.usdc-epjfwdd5aufqssqem2qn1xzybapc8g4weggkzwytdt1v.png"
    },
    ...
  ]
}

Response fields

The relevant response fields are:

Field
Type
Description

provider and name

string

The name of the provider specified in the query.

timestamp

string

The timestamp of when the response was generated.

count

number

The number of tokens included in the response.

tokens

array

An array of token objects, each representing a token available for the specified provider.

For each token, information is provided to properly differentiate it from others:

Field
Type
Description

chain

string

The blockchain the token is associated with (e.g., ETH, BTC, SOL).

address

string

The contract address of the token (only provided if it is not the gas token of the network).

chainId

string

The ID of the chain. It could be a numeric ID (e.g., 42161 for Arbitrum) or a name like solana.

ticker

string

The ticker symbol of the token (e.g., ETH, BTC).

identifier

string

An identifier for the token that combines chain and token address, used to identify the token in SwapKit API.

symbol

string

The token symbol, which includes address information.

name

string

The full name of the token.

decimals

number

The number of decimal places the token supports.

logoURI

string

A URL pointing to the token's logo image.

coingeckoId

string

The identifier of the token on CoinGecko (if available).


Notes

  • The identifier is what SwapKit uses to uniquely identify a token in all its requests and responses. It includes the chain, the name and the token address. It is how the token should be named when using the /quoteendpoint.

    • The identifier is built by putting together Chain.Ticker-ContractAddress (e.g., "ETH.USDC-0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48").

    • Gas assets like BTC, ETH or SOL don't require a contract address, so their identifier is just BTC.BTCfor example.

  • Tokens with an address field are specific instances of a token on a given chain (e.g., USDC on Ethereum or Solana). While the coingeckoIdcould be shared, we provide the relevant contract address for the token in the specific chain.

Previous/providers - Request supported chains by a swap providerNext/quote - Request a trade quote

Last updated 2 months ago