Skip to main content
GET
/
v1
/
chains
/
{chain_name}
/
tokens
List ERC20 tokens
curl --request GET \
  --url https://api.sandbox.immutable.com/v1/chains/{chain_name}/tokens
import requests

url = "https://api.sandbox.immutable.com/v1/chains/{chain_name}/tokens"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.sandbox.immutable.com/v1/chains/{chain_name}/tokens', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.sandbox.immutable.com/v1/chains/{chain_name}/tokens",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sandbox.immutable.com/v1/chains/{chain_name}/tokens"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.sandbox.immutable.com/v1/chains/{chain_name}/tokens")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.immutable.com/v1/chains/{chain_name}/tokens")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "result": [
    {
      "chain": {
        "id": "eip155:13372",
        "name": "imtbl-zkevm-testnet"
      },
      "contract_address": "0xc344c05eef8876e517072f879dae8905aa2b956b",
      "root_contract_address": "0x43e60b30d5bec48c0f5890e3d1e9f1b1296bb4aa",
      "symbol": "AAA",
      "decimals": 18,
      "image_url": "https://some-url",
      "name": "Token A",
      "updated_at": "2022-08-16T17:43:26.991388Z",
      "is_canonical": true,
      "root_chain_id": "eip155:1",
      "bridge_used": "axelar"
    }
  ],
  "page": {
    "previous_cursor": "ewogICJ0eXBlIjogInByZXYiLAogICJpdGVtIjogewogICAgImlkIjogNjI3NTEzMCwKICAgICJjcmVhdGVkX2F0IjogIjIwMjItMDktMTNUMTc6MDQ6MTIuMDI0MTI2WiIKICB9Cn0=",
    "next_cursor": "ewogICJ0eXBlIjogInByZXYiLAogICJpdGVtIjogewogICAgImlkIjogNjI3NTEzMCwKICAgICJjcmVhdGVkX2F0IjogIjIwMjItMDktMTNUMTc6MDQ6MTIuMDI0MTI2WiIKICB9Cn0="
  }
}
{
  "message": "all fields must be provided",
  "link": "https://docs.x.immutable.com/reference/#/",
  "trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
  "code": "VALIDATION_ERROR",
  "details": {}
}
{
  "message": "all fields must be provided",
  "link": "https://docs.x.immutable.com/reference/#/",
  "trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
  "code": "RESOURCE_NOT_FOUND",
  "details": {}
}
{
  "message": "all fields must be provided",
  "link": "https://docs.x.immutable.com/reference/#/",
  "trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
  "code": "INTERNAL_SERVER_ERROR",
  "details": {}
}

Path Parameters

chain_name
string
required

The name of chain

Example:

"imtbl-zkevm-testnet"

Query Parameters

from_updated_at
string<date-time>

Datetime to use as the oldest updated timestamp

Example:

"2022-08-16T17:43:26.991388Z"

verification_status
enum<string>[]

List of verification status to filter by

The verification status for a given contract

Available options:
verified,
unverified,
spam,
inactive
is_canonical
boolean

[Experimental - Canonical token data may be updated] Filter by canonical or non-canonical tokens.

page_cursor
string

Encoded page cursor to retrieve previous or next page. Use the value returned in the response.

Example:

"ewogICJ0eXBlIjogInByZXYiLAogICJpdGVtIjogewogICAgImlkIjogNjI3NTEzMCwKICAgICJjcmVhdGVkX2F0IjogIjIwMjItMDktMTNUMTc6MDQ6MTIuMDI0MTI2WiIKICB9Cn0="

page_size
integer<int32>
default:100

Maximum number of items to return

Required range: 1 <= x <= 200
Example:

10

Response

OK

result
object[]
required

List of tokens

page
object
required

Pagination properties