YAD
SiteDocs
SiteDocs
    • Introduction
    • Blockchains
      GET
    • List tokens
      POST
    • Liquidity sources
      GET
    • Gas prices
      GET
    • Get price for pair
      GET
    • Transaction allowance
      GET
    • Transaction approve
      GET
    • Get quote for pair
      GET
    • Get Bridge Price
      GET
    • Get Bridge Quote
      GET
    • Get Bridge Tokens
      POST

      List tokens

      POST
      https://api.entrswap.io/v2/tokens/list
      Returns list of tokens with filtration and pagination.
      Note. Only paging object is required.

      Request

      Authorization
      Add parameter in header
      X-API-Key
      Example:
      X-API-Key: ********************
      Body Params application/json
      filter
      object (api.TokenFilter) 
      optional
      Object with information for filtration. Searching by all text filters is case-insensitive.
      addresses
      array[string]
      optional
      Array of the token smart contract addresses.
      Example:
      ["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"]
      chain_ids
      array[integer]
      optional
      Array of blockchain IDs.
      Example:
      [1]
      is_active
      boolean 
      optional
      If null - get only active.
      names
      array[string]
      optional
      Array of blockchain names.
      Example:
      ["Ethereum"]
      symbols
      array[string]
      optional
      Array of currencies names.
      Example:
      ["ETH"]
      paging
      object 
      required
      Object with information for pagination.
      page
      integer 
      required
      Page number. Can't be less than 1.
      Example:
      1
      page_size
      integer 
      optional
      Page size. If zero - unlimited page size, max 100.
      Example:
      100
      Example
      {
          "filter": {
              "addresses": [
                  "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
              ],
              "chain_ids": [
                  1
              ],
              "is_active": true,
              "names": [
                  "Ethereum"
              ],
              "symbols": [
                  "ETH"
              ]
          },
          "paging": {
              "page": 1,
              "page_size": 100
          }
      }

      Request samples

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://api.entrswap.io/v2/tokens/list' \
      --header 'Content-Type: application/json' \
      --header 'X-API-Key;' \
      --data-raw '{
          "filter": {
              "addresses": [
                  "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
              ],
              "chain_ids": [
                  1
              ],
              "is_active": true,
              "names": [
                  "Ethereum"
              ],
              "symbols": [
                  "ETH"
              ]
          },
          "paging": {
              "page": 1,
              "page_size": 100
          }
      }'

      Responses

      🟢200OK
      application/json
      Body
      tokens
      array[object (api.Token) {9}] 
      optional
      An array of supported tokens. If no tokens are found, null will be returned.
      chainId
      integer 
      optional
      The blockchain ID. (Supported list: v1/platforms)
      Example:
      1
      address
      string 
      optional
      The token smart contract address.
      Example:
      0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
      name
      string 
      optional
      The full name of the token.
      Example:
      Wrapped Ether
      symbol
      string 
      optional
      The abbreviated name of the token.
      Example:
      WETH
      decimals
      integer 
      optional
      The number of decimals used to get its user representation.
      For example, if decimals equals 2, a balance of 505 tokens should be displayed to a user as 5,05 (505 / 102).
      Example:
      18
      logoURI
      string 
      optional
      The link to the token logo.
      Example:
      https://cl.yad.finance/static-files/1i/1/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/48x48.png
      is_active
      boolean 
      optional
      Technical parameter.
      Example:
      true
      priority
      integer 
      optional
      Token number that determines its popularity within blockchain network.
      Example:
      1
      is_rfq_mode
      boolean 
      optional
      TRUE = the token is supported by RFQ providers.
      Example:
      false
      Example
      {
          "tokens": [
              {
                  "chainId": 1,
                  "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                  "name": "Wrapped Ether",
                  "symbol": "WETH",
                  "decimals": 18,
                  "logoURI": "https://cl.yad.finance/static-files/1i/1/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/48x48.png",
                  "is_active": true,
                  "priority": 1,
                  "is_rfq_mode": false
              }
          ]
      }
      Modified at 2024-05-17 18:47:57
      Previous
      Blockchains
      Next
      Liquidity sources