# Block Attributes

## Contents

* [Base Fee for Block (block\_base\_fee)](#block_base_fee)
* [Priority Fee for Block (block\_priority\_fee)](#block_priority_fee)

## Base Fee for Block <a href="#block_base_fee" id="block_base_fee"></a>

**Definition**

The base fee of the most recent block processed.

**Dictionary**

| Name               | MetricID         | Unit | Interval |
| ------------------ | ---------------- | ---- | -------- |
| Base Fee for Block | block\_base\_fee | ETH  | 1b       |

**Methodology**

The most recent block we processed within a 1-minute window is evaluated and its Base Fee captured. The concept of a Base Fee was introduced as part of EIP-1559 and it represents the portion of the total transaction fees that is destroyed and taken out of circulation (i.e. burnt). Ethereum post-1559 requires users to pay for a Base Fee as a prerequisite to include transactions in a block. The Base Fee can go up or down on the basis of the size (in gas units) of the previous block.

**Available Assets**

Ethereum (ETH)

**Sample Query**

{% embed url="<https://api.coinmetrics.io/v4/timeseries/asset-metrics?api_key=%3Cyour_key%3E&assets=eth&frequency=1b&metrics=block_base_fee&pretty=true>" %}

## Priority Fee for Block <a href="#block_priority_fee" id="block_priority_fee"></a>

**Definition**

The priority fee, or tip, of the most recent block processed.

**Dictionary**

| Name                   | MetricID             | Unit | Interval |
| ---------------------- | -------------------- | ---- | -------- |
| Priority Fee for Block | block\_priority\_fee | ETH  | 1b       |

**Methodology**

The most recent block we processed within a 1-minute window is evaluated and its Priority Fee, or tip, is captured. The concept of a Miner Tip was introduced as part of EIP-1559 and it represents the portion of the total transaction fees that rewards miners. This serves as an added incentive so that miners prioritize transactions that have opted-in and paid a tip. The other portion is called the Base Fee, and it is burnt (destroyed) after the transaction is included in a block.

**Available Assets**

Ethereum (ETH)

**Sample Query**

{% embed url="<https://api.coinmetrics.io/v4/timeseries/asset-metrics?api_key=%3Cyour_key%3E&assets=eth&frequency=1b&metrics=block_priority_fee&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.

{% openapi src="/files/kc3C7O6zTLYNBA0AcsZt" path="/timeseries/asset-metrics" method="get" %}
[openapi.yaml](https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-a236d0d04b3b155748ce07a17aca8108fce9b7c2%2Fopenapi.yaml?alt=media)
{% endopenapi %}

{% tabs %}
{% tab title="Shell" %}

```shell
curl --compressed "https://api.coinmetrics.io/v4/timeseries/asset-metrics?metrics=block_base_fee&assets=eth&frequency=1b&pretty=true&api_key=<your_key>"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
response = requests.get('https://api.coinmetrics.io/v4/timeseries/asset-metrics?metrics=block_base_fee&assets=eth&frequency=1b&pretty=true&api_key=<your_key>').json()
print(response)
```

{% endtab %}

{% tab title="Python Client" %}

```python
from coinmetrics.api_client import CoinMetricsClient

api_key = "<API_KEY>"
client = CoinMetricsClient(api_key)

print(
    client.get_asset_metrics(
        metrics="block_base_fee", 
        assets="eth",
    ).to_dataframe()
)
```

{% endtab %}
{% endtabs %}


---

# 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://gitbook-docs.coinmetrics.io/network-data/network-data-overview/kri/block-attributes.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.
