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

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

***

### Example shortened response

```json
{
  "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:

<table><thead><tr><th width="257">Field</th><th width="102">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>provider</code> and <code>name</code></td><td><code>string</code></td><td>The name of the provider specified in the query.</td></tr><tr><td><code>timestamp</code></td><td><code>string</code></td><td>The timestamp of when the response was generated.</td></tr><tr><td><code>count</code></td><td><code>number</code></td><td>The number of tokens included in the response.</td></tr><tr><td><code>tokens</code></td><td><code>array</code></td><td>An array of token objects, each representing a token available for the specified provider.</td></tr></tbody></table>

#### For each token, information is provided to properly differentiate it from others. It is important to note the `identifier` since it is what identifies a token within the SwapKit API:

<table><thead><tr><th width="257">Field</th><th width="102">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>chain</code></td><td><code>string</code></td><td>The blockchain the token is associated with (e.g., <code>ETH</code>, <code>BTC</code>, <code>SOL</code>).</td></tr><tr><td><code>address</code></td><td><code>string</code></td><td>The contract address of the token (only provided if it is not the gas token of the network).</td></tr><tr><td><code>chainId</code></td><td><code>string</code></td><td>The ID of the chain. It could be a numeric ID (e.g., <code>42161</code> for Arbitrum) or a name like <code>solana</code>.</td></tr><tr><td><code>ticker</code></td><td><code>string</code></td><td>The ticker symbol of the token (e.g., <code>ETH</code>, <code>BTC</code>).</td></tr><tr><td><code>identifier</code></td><td><code>string</code></td><td>An identifier for the token that combines chain and token address, used to identify the token in SwapKit API.</td></tr><tr><td><code>symbol</code></td><td><code>string</code></td><td>The token symbol, which includes address information.</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td>The full name of the token.</td></tr><tr><td><code>decimals</code></td><td><code>number</code></td><td>The number of decimal places the token supports.</td></tr><tr><td><code>logoURI</code></td><td><code>string</code></td><td>A URL pointing to the token's logo image.</td></tr><tr><td><code>coingeckoId</code></td><td><code>string</code></td><td>The identifier of the token on CoinGecko (if available).</td></tr></tbody></table>

***

### 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 `/quote` endpoint.
  * 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.BTC` for example.&#x20;
* Tokens with an `address` field are specific instances of a token on a given chain (e.g., `USDC` on Ethereum or Solana). While the `coingeckoId` could be shared, we provide the relevant contract address for the token in the specific chain.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.swapkit.dev/swapkit-api/tokens-request-supported-tokens-by-a-swap-provider.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
