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

# Stats

The Stats module provides indexed token supply, native supply, price and transaction-fee information.

### Endpoint

```
https://explorer.tajirchain.com/api?module=stats
```

Some action names retain Ethereum terminology for API compatibility. On Tajir Chain, native-coin results refer to TJR.

### Available Actions

| Action              | Purpose                                          |
| ------------------- | ------------------------------------------------ |
| `tokensupply`       | Get token supply                                 |
| `ethsupplyexchange` | Get native supply from configured exchange data  |
| `ethsupply`         | Get indexed native supply                        |
| `coinsupply`        | Get native supply minus configured burned supply |
| `ethprice`          | Get compatibility-format native price            |
| `coinprice`         | Get general-format native price                  |
| `totalfees`         | Get total transaction fees for a date            |

### Get Token Supply

#### Action

```
tokensupply
```

| Parameter         | Required | Description                        |
| ----------------- | -------- | ---------------------------------- |
| `contractaddress` | Yes      | ERC-20 or ERC-721 contract address |

```bash
curl "https://explorer.tajirchain.com/api?module=stats&action=tokensupply&contractaddress=0xTOKEN_CONTRACT"
```

The result uses the token’s smallest unit.

### Get Native Supply from Exchange Data

#### Action

```
ethsupplyexchange
```

```bash
curl "https://explorer.tajirchain.com/api?module=stats&action=ethsupplyexchange"
```

The compatibility action name contains `eth`, but the result refers to the Tajir Chain native coin.

If an external exchange-data provider is not configured, the result may be zero.

### Get Indexed Native Supply

#### Action

```
ethsupply
```

```bash
curl "https://explorer.tajirchain.com/api?module=stats&action=ethsupply"
```

The result is returned in the native coin’s smallest unit.

### Get Native Coin Supply

#### Action

```
coinsupply
```

```bash
curl "https://explorer.tajirchain.com/api?module=stats&action=coinsupply"
```

This action can return a plain numeric value instead of the standard `status`, `message` and `result` structure.

Applications must therefore handle both structured JSON and direct numeric responses.

### Get Native Price in Compatibility Format

#### Action

```
ethprice
```

```bash
curl "https://explorer.tajirchain.com/api?module=stats&action=ethprice"
```

Example response structure:

```json
{
  "message": "OK",
  "result": {
    "ethbtc": null,
    "ethbtc_timestamp": null,
    "ethusd": null,
    "ethusd_timestamp": null
  },
  "status": "1"
}
```

The field names are retained for compatibility. Values may be `null` when no price provider is configured.

### Get Native Price in General Format

#### Action

```
coinprice
```

```bash
curl "https://explorer.tajirchain.com/api?module=stats&action=coinprice"
```

Example response structure:

```json
{
  "message": "OK",
  "result": {
    "coin_btc": null,
    "coin_btc_timestamp": null,
    "coin_usd": null,
    "coin_usd_timestamp": null
  },
  "status": "1"
}
```

Price fields may be `null` when price data is unavailable.

### Get Daily Transaction Fees

#### Action

```
totalfees
```

| Parameter | Required | Description                     |
| --------- | -------- | ------------------------------- |
| `date`    | Yes      | UTC date in `YYYY-MM-DD` format |

```bash
curl "https://explorer.tajirchain.com/api?module=stats&action=totalfees&date=2026-08-26"
```

The result contains the total indexed transaction fees for the selected day in wei.
