> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blockscout.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Stats

> ?module=stats

### `https://instance_base_url/api?module=stats`

## Get [ERC-20](https://github.com/ethereum/EIPs/issues/20) or [ERC-721](https://github.com/ethereum/EIPs/issues/721) token total supply by contract address

`tokensupply`

**Example**

```javascript theme={null}
https://instance_base_url/api
   ?module=stats
   &action=tokensupply
   &contractaddress={contractAddressHash}
```

<Tabs>
  <Tab title="Request Param">
    | Parameter       | Description                                                                                    |
    | --------------- | ---------------------------------------------------------------------------------------------- |
    | contractaddress | `string` containing the contract address hash - a 160-bit code used for identifying contracts. |
  </Tab>

  <Tab title="Example Result">
    ```json theme={null}
    {
      "message": "OK",
      "result": "21265524714464",
      "status": "1"
    }
    ```
  </Tab>
</Tabs>

## Get total supply in Wei from exchange

`ethsupplyexchange`

**Example:**

```javascript theme={null}
https://instance_base_url/api
   ?module=stats
   &action=ethsupplyexchange
```

<Tabs>
  <Tab title="Request Param">
    | Parameter | Description |
    | --------- | ----------- |
  </Tab>

  <Tab title="Example Result">
    ```json theme={null}
    {
        "message": "OK",
        "result": "120687572663070000000000000.0",
        "status": "1"
    }
    ```
  </Tab>
</Tabs>

## Get total supply in Wei from DB

`ethsupply`

**Example:**

```javascript theme={null}
https://instance_base_url/api
   ?module=stats
   &action=ethsupply
```

<Tabs>
  <Tab title="Request Params">
    | Parameter | Description |
    | --------- | ----------- |
  </Tab>

  <Tab title="Example Result">
    ```json theme={null}
    {
        "message": "OK",
        "result": "641142123374738216902696563",
        "status": "1"
    }
    ```
  </Tab>
</Tabs>

## Get total coin supply from DB minus burnt number

`coinsupply`

**Example:**

```javascript theme={null}
https://instance_base_url/api
   ?module=stats
   &action=coinsupply
```

<Tabs>
  <Tab title="Request Params">
    | Parameter | Description |
    | --------- | ----------- |
  </Tab>

  <Tab title="Example Result">
    ```json theme={null}
    {
        "message": "OK",
        "result": "641142123374738216902696563",
        "status": "1"
    }
    ```
  </Tab>
</Tabs>

## Get latest price of native coin in USD and BTC

`ethprice`

**Example:**

```javascript theme={null}
https://instance_base_url/api
   ?module=stats
   &action=ethprice
```

<Tabs>
  <Tab title="Request Params">
    | Parameter | Description |
    | --------- | ----------- |
  </Tab>

  <Tab title="Example Result">
    ```json theme={null}
    {
        "message": "OK",
        "result": {
            "ethbtc": "0.02954612",
            "ethbtc_timestamp": "1777625996",
            "ethusd": "2285.39",
            "ethusd_timestamp": "1777625996"
        },
        "status": "1"
    }
    ```
  </Tab>
</Tabs>

## Get latest price of native coin in USD and BTC in more general format

`coinprice`

**Example:**

```javascript theme={null}
https://instance_base_url/api
   ?module=stats
   &action=coinprice
```

<Tabs>
  <Tab title="Request Params">
    | Parameter | Description |
    | --------- | ----------- |
  </Tab>

  <Tab title="Example Result">
    ```json theme={null}
    {
        "message": "OK",
        "result": {
            "coin_btc": "0.02954612",
            "coin_btc_timestamp": "1777625996",
            "coin_usd": "2285.39",
            "coin_usd_timestamp": "1777625996"
        },
        "status": "1"
    }
    ```
  </Tab>
</Tabs>

## Get total transaction fees in Wei paid by users to validators per day

`totalfees`

**Example:**

```javascript theme={null}
https://instance_base_url/api
   ?module=stats
   &action=totalfees
```

<Tabs>
  <Tab title="Request Params">
    | Parameter | Description                                                                                    |
    | --------- | ---------------------------------------------------------------------------------------------- |
    | date      | `string` containing the contract address hash - a 160-bit code used for identifying contracts. |
  </Tab>

  <Tab title="Example Result">
    ```json theme={null}
    {
        "message": "OK",
        "result": "67872425678410713267",
        "status": "1"
    }
    ```
  </Tab>
</Tabs>
