token list

API Endpoint: /defi/tokenlist

Description: This endpoint facilitates the retrieval of a list of tokens based on various sorting criteria. You can specify the sorting method, sorting type, pagination parameters, and blockchain network to obtain a list of tokens along with their details. This API call is useful for obtaining an overview of tokens' metrics, such as market capitalization, trading volume, and price change percentage over the last 24 hours.

Request Method: GET

Data Coverage: Multi-chain

Request URL:

https://public-api.birdeye.so/defi/tokenlist?sort_by=v24hUSD&sort_type=desc&offset=0&limit=50

Request Headers:

accept: application/json
x-chain: any chains that Birdeye supports. Example: solana, ethereum
X-API-KEY: YOUR_API_KEY

Parameters:

  • sort_by (string): The parameter to sort the tokens by (e.g., v24hUSD).
  • sort_type (string): The sorting type (desc or asc).
  • offset (int): The starting index of the token list for pagination.
  • limit (int): The maximum number of tokens to retrieve (maximum value of 50).

Response: The response includes an array of token objects with their respective details, including token address, decimals, logo URI, market capitalization, symbol, 24-hour change percentage, trading volume over the last 24 hours, token name, and the total number of tokens available.

Example Request:

curl -X 'GET' \
  'https://public-api.birdeye.so/defi/tokenlist?sort_by=v24hUSD&sort_type=desc&offset=0&limit=50' \
  -H 'accept: application/json' \
  -H 'x-chain: solana' \
  -H 'X-API-KEY: YOUR_API_KEY'

Example Response:

{
  "data": {
    "updateUnixTime": 1692203008,
    "updateTime": "2023-08-16T16:23:28",
    "tokens": [
      {
        "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "decimals": 6,
        "logoURI": "https://img.fotofolio.xyz/?w=30&h=30&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolana-labs%2Ftoken-list%2Fmain%2Fassets%2Fmainnet%2FEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v%2Flogo.png",
        "mc": 5034893047.819173,
        "symbol": "USDC",
        "v24hChangePercent": 32.10423521982971,
        "v24hUSD": 30582475.965653457,
        "name": "USD Coin"
      },
      // More token objects...
    ],
    "total": 11037
  },
  "success": true
}

Note: The provided example illustrates the sorting of tokens by 24-hour trading volume in USD (v24hUSD), in descending order. Adjust the parameters as needed to tailor the response to your preferences.