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

# Transaction Fees

## Contents

* [Block Maximum Fees (block\_fee\_max)](https://kb.talostrading.com/coinmetrics/network-data/network-data-overview/kri/transaction-fees.md#block_fee_max)
* [Block Mean Fees (block\_fee\_mean)](https://kb.talostrading.com/coinmetrics/network-data/network-data-overview/kri/transaction-fees.md#block_fee_mean)
* [Block Median Fees (block\_fee\_median)](https://kb.talostrading.com/coinmetrics/network-data/network-data-overview/kri/transaction-fees.md#block_fee_median)
* [Block Minimum Fees (block\_fee\_min)](https://kb.talostrading.com/coinmetrics/network-data/network-data-overview/kri/transaction-fees.md#block_fee_min)
* [Miner Fees per Block (block\_fees)](https://kb.talostrading.com/coinmetrics/network-data/network-data-overview/kri/transaction-fees.md#block_fees)

## Block Maximum Fees

**Definition**

Mined block's max transaction fee in native units.

**Dictionary**

<table><thead><tr><th width="165" /><th width="210" /><th width="107" /><th /></tr></thead><tbody><tr><td>Name</td><td>MetricID</td><td>Unit</td><td>Interval</td></tr><tr><td>Block Maximum Fees</td><td>block\_fee\_max</td><td>Native Currency</td><td>1 block</td></tr></tbody></table>

**Methodology**

The most recently-mined block is evaluated and the maximum of fees in that block is computed.

**Available Assets**

Bitcoin (BTC)

**Sample Query**

[https://api.coinmetrics.io/v4/timeseries/asset-metrics?api\_key=%3Cyour\_key%3E\&assets=btc\&frequency=1b\&metrics=block\_fee\_max\&pretty=true](https://api.coinmetrics.io/v4/timeseries/asset-metrics?api_key=%3Cyour_key%3E\&assets=btc\&frequency=1b\&metrics=block_fee_max\&pretty=true)

## Block Mean Fees

**Definition**

Mined block's mean transaction fee in native units.

**Dictionary**

<table><thead><tr><th width="165" /><th width="210" /><th width="107" /><th /></tr></thead><tbody><tr><td>Name</td><td>MetricID</td><td>Unit</td><td>Interval</td></tr><tr><td>Block Mean Fees</td><td>block\_fee\_mean</td><td>Native Currency</td><td>1 block</td></tr></tbody></table>

**Methodology**

The most recently-mined block is evaluated and the mean of fees in that block is computed.

**Available Assets**

Bitcoin (BTC)

**Sample Query**

[https://api.coinmetrics.io/v4/timeseries/asset-metrics?api\_key=%3Cyour\_key%3E\&assets=btc\&frequency=1b\&metrics=block\_fee\_mean\&pretty=true](https://api.coinmetrics.io/v4/timeseries/asset-metrics?api_key=%3Cyour_key%3E\&assets=btc\&frequency=1b\&metrics=block_fee_mean\&pretty=true)

## Block Median Fees

**Definition**

Mined block's median transaction fee in native units.

**Dictionary**

<table><thead><tr><th width="165" /><th width="210" /><th width="107" /><th /></tr></thead><tbody><tr><td>Name</td><td>MetricID</td><td>Unit</td><td>Interval</td></tr><tr><td>Block Median Fees</td><td>block\_fee\_median</td><td>Native Currency</td><td>1 block</td></tr></tbody></table>

**Methodology**

The most recently-mined block is evaluated and the median of fees in that block is computed.

**Available Assets**

Bitcoin (BTC)

**Sample Query**

[https://api.coinmetrics.io/v4/timeseries/asset-metrics?api\_key=%3Cyour\_key%3E\&assets=btc\&frequency=1b\&metrics=block\_fee\_median\&pretty=true](https://api.coinmetrics.io/v4/timeseries/asset-metrics?api_key=%3Cyour_key%3E\&assets=btc\&frequency=1b\&metrics=block_fee_median\&pretty=true)

## Block Minimum Fees

**Definition**

Mined block's minimum transaction fee in native units.

**Dictionary**

<table><thead><tr><th width="165" /><th width="210" /><th width="107" /><th /></tr></thead><tbody><tr><td>Name</td><td>MetricID</td><td>Unit</td><td>Interval</td></tr><tr><td>Block Minimum Fees</td><td>block\_fee\_min</td><td>Native Currency</td><td>1 block</td></tr></tbody></table>

**Methodology**

The most recently-mined block is evaluated and the minimum of fees in that block is computed.

**Available Assets**

Bitcoin (BTC)

**Sample Query**

[https://api.coinmetrics.io/v4/timeseries/asset-metrics?api\_key=%3Cyour\_key%3E\&assets=btc\&frequency=1b\&metrics=block\_fee\_min\&pretty=true](https://api.coinmetrics.io/v4/timeseries/asset-metrics?api_key=%3Cyour_key%3E\&assets=btc\&frequency=1b\&metrics=block_fee_min\&pretty=true)

## Miner Fees per Block

**Definition**

The sum of fees paid to miners for the transactions included in each mined block.

**Dictionary**

| Name | MetricID | Unit | Interval |
| - | - | - | - |
| Miner Fees per block | block\_fees | Difficulty | 1 block |

**Methodology**

The most recently-mined block is evaluated and the sum of fees in that block is computed.

**Available Assets**

Bitcoin (BTC), *Ethereum (ETH)\**

*\* Historical data covering the pre-merge timeframe only (up to 9/15/2022). With the merge ETH switched from Proof of Work and miners to Proof of Stake and validators meaning the miner fees per block are non-existent post the merge date for Ethereum.*

**Sample Query**

[https://api.coinmetrics.io/v4/timeseries/asset-metrics?api\_key=%3Cyour\_key%3E\&assets=btc\&frequency=1b\&limit\_per\_asset=1\&metrics=block\_fees\&pretty=true](https://api.coinmetrics.io/v4/timeseries/asset-metrics?api_key=%3Cyour_key%3E\&assets=btc\&frequency=1b\&limit_per_asset=1\&metrics=block_fees\&pretty=true)

## API Endpoints

metrics can be accessed using these endpoints:

* `timeseries/asset-metrics`

and by passing in the metric ID's `block_fee*` in the `metrics` parameter.

`GET /timeseries/asset-metrics`

> [tab] Shell
>
> ```shell theme={null}
> curl --compressed "https://api.coinmetrics.io/v4/timeseries/asset-metrics?metrics=block_fees&assets=btc&frequency=1b&pretty=true&api_key=<your_key>"
> ```

> [tab] Python
>
> ```python theme={null}
> import requests
> response = requests.get('https://api.coinmetrics.io/v4/timeseries/asset-metrics?metrics=block_fees&assets=btc&frequency=1b&pretty=true&api_key=<your_key>').json()
> print(response)
> ```

> [tab] Python Client
>
> ```python theme={null}
> from coinmetrics.api_client import CoinMetricsClient
>
> api_key = "<API_KEY>"
> client = CoinMetricsClient(api_key)
>
> print(
>     client.get_asset_metrics(
>         metrics="block_fees", 
>         assets="btc",
>     ).to_dataframe()
> )
> ```
