# Tokens APIs

### Get ERC20-Token total supply by contract's address

#### URI

<table data-header-hidden><thead><tr><th width="130"></th><th></th></tr></thead><tbody><tr><td><strong>network</strong></td><td><strong>uri</strong></td></tr><tr><td><em>Mainnet</em></td><td>GET https://explorerapi.wemix.com/v1/tokens/{contract_address}/total-supply</td></tr><tr><td><em>Testnet</em></td><td>GET https://explorerapi.test.wemix.com/v1/tokens/{contract_address}/total-supply</td></tr></tbody></table>

#### **REQUEST PARAMETER**

* **HEADER**

| **key**   | **value** | **required** |
| --------- | --------- | ------------ |
| *api-key* | api-key   | true         |

#### **REQUEST SAMPLE**

```
GET https://explorerapi.wemix.com/v1/tokens/0x8E81fCc2d4A3bAa0eE9044E0D7E36F59C9BbA9c1/total-supply
api-key: 1ba5e446edf1997f67b51bf9e60b3fbba6fa1bf84301115292805d7e24f43539
```

#### **RESPONSE PARAMETER**

| **key**                      | **type**      | **value**                   |
| ---------------------------- | ------------- | --------------------------- |
| *status*                     | String        | Status of request           |
| *message*                    | String        | Response Message of request |
| *results*                    | Json          | Results of request          |
| *results.data*               | List\<Object> | List of data                |
| *results.data.total\_supply* | String        | Total supply of token       |

#### **RESPONSE SAMPLE**

```
{
    "status": "200",
    "message": "success",
    "results": {
        "data": {
            "total_supply": "9782909016599000000000000"
        }
    }
}
```

### Get ERC20-Token Account Balance

#### **URI**

<table data-header-hidden><thead><tr><th width="128"></th><th></th></tr></thead><tbody><tr><td><strong>network</strong></td><td><strong>uri</strong></td></tr><tr><td><em>Mainnet</em></td><td>GET https://explorerapi.wemix.com/v1/tokens/{contract_address}/balance/{address_hash}</td></tr><tr><td><em>Testnet</em></td><td>GET https://explorerapi.test.wemix.com/v1/tokens/{contract_address}/balance/{address_hash}</td></tr></tbody></table>

#### **REQUEST PARAMETER**

* **HEADER**

| **key**   | **value** | **required** |
| --------- | --------- | ------------ |
| *api-key* | api-key   | true         |

#### **REQUEST SAMPLE**

```
GET https://explorerapi.wemix.com/v1/tokens/0x8E81fCc2d4A3bAa0eE9044E0D7E36F59C9BbA9c1/balance/0x2769c8A36d2cEF785952e08224c457AefccD0b6a
api-key: 1ba5e446edf1997f67b51bf9e60b3fbba6fa1bf84301115292805d7e24f43539
```

#### **RESPONSE PARAMETER**

| **key**                | **type**      | **value**                               |
| ---------------------- | ------------- | --------------------------------------- |
| *status*               | String        | Status of request                       |
| *message*              | String        | Response Message of request             |
| *results*              | Json          | Results of request                      |
| *results.data*         | List\<Object> | List of data                            |
| *results.data.balance* | String        | Balance of address with ERC-20 contract |

#### **RESPONSE SAMPLE**

```
{
    "status": "200",
    "message": "success",
    "results": {
        "data": {
            "balance": "82256898291758"
        }
    }
}
```

### Get ERC-721 Token held by holder inventory

#### **URI**

<table data-header-hidden><thead><tr><th width="128"></th><th></th></tr></thead><tbody><tr><td><strong>network</strong></td><td><strong>uri</strong></td></tr><tr><td><em>Mainnet</em></td><td>GET https://explorerapi.wemix.com/v1/tokens/{contract_address}/inventory<br><br>GET https://explorerapi.wemix.com/v1/tokens/{contract_address}/inventory/{holder_address}</td></tr><tr><td><em>Testnet</em></td><td>GET https://explorerapi.test.wemix.com/v1/tokens/{contract_address}/inventory<br><br>GET https://explorerapi.test.wemix.com/v1/tokens/{contract_address}/inventory/{holder_address}</td></tr></tbody></table>

#### **REQUEST PARAMETER**

* **HEADER**

| **key**   | **value** | **required** |
| --------- | --------- | ------------ |
| *api-key* | api-key   | true         |

* **QUERY STRING**

<table data-header-hidden><thead><tr><th></th><th width="198"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>key</strong></td><td><strong>type</strong></td><td><strong>value</strong></td><td><strong>required</strong></td></tr><tr><td><em>limit</em></td><td>Number</td><td>Maximum number of record will retrieve                                               Default: 50, Max: 1000</td><td>false</td></tr><tr><td><em>offset</em></td><td>Number</td><td>Start retrieve record                                                Default: 0</td><td>false</td></tr><tr><td><em>holder_address</em></td><td>String</td><td>Address of holder</td><td></td></tr></tbody></table>

#### **REQUEST SAMPLE**

```
GET https://explorerapi.test.wemix.com/v1/tokens/0x62e1ad2a3a9ab55ba20bc4eb27fca655c41fdd88/inventory
api-key: 1ba5e446edf1997f67b51bf9e60b3fbba6fa1bf84301115292805d7e24f43539

GET https://explorerapi.test.wemix.com/v1/tokens/0x62e1ad2a3a9ab55ba20bc4eb27fca655c41fdd88/inventory/0x07f4701f781c898cf18883262ab0e7c3cc199835
api-key: 1ba5e446edf1997f67b51bf9e60b3fbba6fa1bf84301115292805d7e24f43539
```

#### **RESPONSE PARAMETER**

| **key**                        | **type**      | **value**                               |
| ------------------------------ | ------------- | --------------------------------------- |
| *status*                       | String        | Status of request                       |
| *message*                      | String        | Response Message of request             |
| *results*                      | Json          | Results of request                      |
| *results.count*                |               |                                         |
| *results.data*                 | List\<Object> | List of data                            |
| *results.data.holder\_address* | String        | Balance of address with ERC-20 contract |
| *results.data.token\_id*       | String        | Uri of token                            |
| *results.data.token\_uri*      | String        | Id of token                             |
| *results.token\_name*          | String        | Name of token                           |
| *results.token\_symbol*        | String        | Symbol of token                         |

#### **RESPONSE SAMPLE**

```
{
    "status": "200",
    "message": "success",
    "results": {
        "count": "65",
        "data": [
            {
                "holder_address": "0xb0fb83eed8de308d0a076b9763d47a0e1f5d3b7d",
                "token_id": "51",
                "token_uri": "ipfs://bafyreifytod4coyoolbxj6f4nm6hluwqcrhy4vi5hxl5nzpeydodnowh7u/metadata.json"
            },
           ...
        ],
        "token_name": "Tangled",
        "token_symbol": "TTPS"
    }
}
```


---

# 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.wemix.com/en/dapp-developer/api-reference/tokens-apis.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.
