# Token

### `https://quaiscan.io/api?module=token`

## Get ERC-20 or ERC-721 token by contract address

`getToken`

Info on name, symbol, supply and type for a token contract address.

**Example**

```
https://quaiscan.io/api
   ?module=token
   &action=getToken
   &contractaddress={contractaddressHash}
```

{% tabs %}
{% tab title="Request Params" %}

<table><thead><tr><th width="247.5">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>contractaddress</td><td><code>string</code> containing the contract address hash - a 160-bit code used for identifying contracts.</td></tr></tbody></table>
{% endtab %}

{% tab title="Example Result" %}

```json
{
  "message": "OK",
  "result": {
    "cataloged": true,
    "contractAddress": "0x0000000000000000000000000000000000000000",
    "decimals": "18",
    "name": "Example Token",
    "symbol": "ET",
    "totalSupply": "1000000000",
    "type": "ERC-20"
  },
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

## Get token holders by contract address

`getTokenHolders`

Returns an array of token holder's accounts and amounts held for a specified token contract address.

**Example**

```
https://quaiscan.io/api
   ?module=token
   &action=getTokenHolders
   &contractaddress={contractaddressHash}
   &page={integer}
   &offset={integer}
```

{% tabs %}
{% tab title="Request Params" %}

<table><thead><tr><th width="186.5">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>contractaddress</td><td><code>string</code> containing the contract address hash of the ERC-20/ERC-721 token</td></tr><tr><td>page</td><td><mark style="background-color:yellow;">optional</mark> nonnegative <code>integer</code> representing the page number used for pagination. 'offset' must also be provided.</td></tr><tr><td>offset</td><td><mark style="background-color:yellow;">optional</mark> nonnegative <code>integer</code> representing the max number of records to return when paginating. 'page' must also be provided.</td></tr></tbody></table>
{% endtab %}

{% tab title="Example Result" %}

```json
{
  "message": "OK",
  "result": [
    {
      "address": "0x005f644097F8f0E9f996Dca4F4F23aBB6C1Cc8b3",
      "value": "153737849289497644937838"
    },
  ],
  "status": "1"
}
```

{% endtab %}
{% endtabs %}


---

# 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.quaiscan.io/developer-support/api/rpc-endpoints/token.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.
