> For the complete documentation index, see [llms.txt](https://docs.metadium.com/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metadium.com/en/api-reference/explorer-api/tokens.md).

# Tokens

### Get MRC20-Token Total Supply by Contract's Address <a href="#erc20-token-total-supply" id="erc20-token-total-supply"></a>

Returns the total MRC20 token supply of the contract's address.

```
GET https://testnetapi.metadium.com/v1/tokens/{contract_hash/total-supply
api-key: Your API Key
```

{% tabs %}
{% tab title="Request" %}
Query Parameters

<table data-header-hidden><thead><tr><th width="209"></th><th></th></tr></thead><tbody><tr><td><strong>Parameter</strong></td><td><strong>Description</strong></td></tr><tr><td><em>contract_hash</em></td><td><p>type: String</p><p>value: Address of contract</p><p>required: true</p></td></tr></tbody></table>
{% endtab %}

{% tab title="Response" %}

```
//Response Sample Result
{
    "status": "200",
    "message": "success",
    "results": {
        "data": {
            "total_supply": "100000000000000000000000000"
        }
    }
}
```

{% endtab %}
{% endtabs %}

***

### Get MRC20-Token Account Balance <a href="#erc20-token-account-balance" id="erc20-token-account-balance"></a>

Returns the balance of the MRC20 token account.

```
GET https://testnetapi.metadium.com/v1/tokens/{contract_hash}/balance/{address_hash}
api-key: Your API Key
```

{% tabs %}
{% tab title="Request" %}
Query Parameters

<table data-header-hidden><thead><tr><th width="209"></th><th></th></tr></thead><tbody><tr><td><strong>Parameter</strong></td><td><strong>Description</strong></td></tr><tr><td><em>contract_hash</em></td><td><p>type: String</p><p>value: Address of contract</p><p>required: true</p></td></tr><tr><td><em>address_hash</em></td><td><p>type: String</p><p>value: Address (sender/receiver/contract)</p><p>required: true</p></td></tr></tbody></table>
{% endtab %}

{% tab title="Response" %}

```
//Response Sample Result
{
    "status": "200",
    "message": "success",
    "results": {
        "data": {
            "balance": "461538000000000"
        }
    }
}
```

{% endtab %}
{% endtabs %}

***

### Get MRC-721 Token Held by Holder Inventory <a href="#erc-721-token-holder" id="erc-721-token-holder"></a>

Returns the list of MRC721 held by the holder.

```
GET https://testnetapi.metadium.com/v1/tokens/{contract_hash}/inventory
api-key: Your API Key
```

{% tabs %}
{% tab title="Request" %}
Query Parameters

<table data-header-hidden><thead><tr><th width="209"></th><th></th></tr></thead><tbody><tr><td><strong>Parameter</strong></td><td><strong>Description</strong></td></tr><tr><td><em>contract_hash</em></td><td><p>type: String</p><p>value: Address of contract</p><p>required: true</p></td></tr><tr><td><em>address_hash</em></td><td><p>type: String</p><p>value: Address (sender/receiver/contract)</p><p>required: true</p></td></tr></tbody></table>

{% endtab %}

{% tab title="Response" %}

```
//Response Sample Result
{
    "status": "200",
    "message": "success",
    "results": {
        "count": "1",
        "data": [
            {
                "holder_address": "0xcf48564c80a7dd2f4c76ea24f83d35f072bb6481",
                "token_id": "216075950392623962897824347046195959403",
                "token_uri": ""
            }
        ],
        "token_name": "save the earth",
        "token_symbol": null
    }
}

{
    "status": "200",
    "message": "success",
    "results": {
        "count": "1",
        "data": [
            {
                "holder_address": "0xcf48564c80a7dd2f4c76ea24f83d35f072bb6481",
                "token_id": "216075950392623962897824347046195959403",
                "token_uri": ""
            }
        ],
        "token_name": "save the earth",
        "token_symbol": null
    }
}
```

{% endtab %}
{% endtabs %}

***

### Token Holder count lookup

Returns the number of holders holding the token.

```
GET https://testnetapi.metadium.com/v1/tokens/{contract_hash}/holder-count
api-key: Your API Key
```

{% tabs %}
{% tab title="Request" %}
Query Parameters

<table data-header-hidden><thead><tr><th width="209"></th><th></th></tr></thead><tbody><tr><td><strong>Parameter</strong></td><td><strong>Description</strong></td></tr><tr><td><em>contract_hash</em></td><td><p>type: String</p><p>value: Address of contract</p><p>required: true</p></td></tr></tbody></table>
{% endtab %}

{% tab title="Response" %}

```
//Response Sample Result
{
    "status": "200",
    "message": "success",
    "results": {
        "data": {
            "holder_count": "1"
        }
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.metadium.com/en/api-reference/explorer-api/tokens.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
