# Blocks

## Contents

* [Block Cnt](#blkcnt)
* [Block Height](#blkhgt)
* [Mean Block Interval (seconds)](#blkintmean)
* [Sum Block Size (in bytes)](#blksizebyte)
* [Mean Block Size (in bytes)](#blksizemeanbyte)
* [Uncle Blocks Cnt](#blkunccnt)
* [Miner Revenue from Uncle Blocks (%)](#blkuncrevpct)
* [Uncle Reward](#blkuncrwd)
* [Mean Block Weight](#blkwghtmean)
* [Sum Block Weight](#blkwghttot)
* [MEV Block Cnt](#blkwghttot-1)

## Block Cnt <a href="#blkcnt" id="blkcnt"></a>

### Definition

The sum count of blocks created that interval that were included in the main (base) chain.

| Name      | MetricID | Unit   | Interval      |
| --------- | -------- | ------ | ------------- |
| Block Cnt | BlkCnt   | Blocks | 1 day, 1 hour |

### Details

* Only mainchain (non-orphaned/uncles) blocks are counted.
* For chains that use median time, the day is defined using it, otherwise, it’s defined using the block’s timestamps.

### Chart

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-d3788fcac39b5e03e54f2c0d240206c3c3bb7f9a%2FETH_Block_Count.png?alt=media" alt=""><figcaption></figcaption></figure>

### Asset-Specific Details

* Every blockchain will have a Block Count measurement as it's a fundamental aspect of the the distributed ledger technology.

### Examples

* The drawdowns in the ETH block counts can be explained by the numerous hard forks. Block difficulty would rise making it harder for miners to find the next block resulting in an increase in time between blocks therefore less blocks are created each day.

### Release History

* Released in the 1.0 release of NDP

### Interpretation

Block count is typically rather static, but can vary in blockchains which rely on a poisson process for finding new blocks. In proof-of-work chains with long difficulty adjustment windows and significant variance in block times, like Bitcoin, block count can diverge widely from the expected rate. This can happen during competitions for hashpower around the time of forks, or when a significant amount of hashpower is added or subtracted from the blockchain in a short period.

### Availability for Assets

{% embed url="<https://coverage.coinmetrics.io/asset-metrics/BlkCnt>" %}

## Block Height <a href="#blkhgt" id="blkhgt"></a>

### Definition

The count of blocks from the genesis (first) block to the last block of that interval on the main chain (in other words, the total number of blocks ever created and included on the chain).

### Dictionary

| Name         | MetriID | Unit   | Interval               |
| ------------ | ------- | ------ | ---------------------- |
| Block Height | BlkHgt  | Blocks | 1 block, 1 day, 1 hour |

### Details

* Only mainchain (non-orphaned/uncles) blocks are counted.
* For chains that use median time, the day is defined using it, otherwise, it’s defined using the block’s timestamps

### Chart

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-a8584b43eb5201c5890a3d82b3f6e1ed81facdf8%2FBTC_and_ETH_Block_Heights.png?alt=media" alt=""><figcaption></figcaption></figure>

### Asset-Specific Details

* Every blockchain will have a Block Height measurement as it's a fundamental aspect of the the distributed ledger technology.

### Examples

* Depending on the blockchain, blocks can be produced at different intervals. The longer a blockchain has been in existence and the faster the blocks are produced, the larger the block height will be. ETH blocks are produced every 14 seconds compared to BTC where blocks are created every 10 minutes or so. Therefore, the block height for ETH will be significantly larger than BTC.

### Release History

* Released in the 4.3 release of NDP

### Interpretation

* New transactions are grouped and added to new blocks on the blockchain. Each block is linked to the previous one and they essentially are stacked together

### Availability for Assets

{% embed url="<https://coverage.coinmetrics.io/asset-metrics/BlkHgt>" %}

## Mean Block Interval (seconds) <a href="#blkintmean" id="blkintmean"></a>

### Definition

The mean time (in seconds) between all the blocks created that interval.

| Name            | MetricID   | Unit    | Interval               |
| --------------- | ---------- | ------- | ---------------------- |
| Mean Time Block | BlkIntMean | Seconds | 1 block, 1 day, 1 hour |

### Details

* Only mainchain (non-orphaned/uncles) blocks are counted.
* For chains that use median time, the day is defined using it, otherwise, it’s defined using the block’s timestamps.
* The absolute interval is used (if block n+1 has a timestamp lower than block n, we use the absolute value of the difference in timestamps, see examples).
* For the block-by-block frequency, it can be interpreted as the amount of time between the publishing of the previous block and the most recent block.
  * For example, Block 1 is published at a timestamp of 02:00:00 UTC, Block 2 is published at a timestamp of 02:10:00 UTC, so the BlkIntMean would just be 10m for Block 2.

### Chart

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-e585a9cdbf46785f87ab74798b68dc350c8df445%2FComparing_ETH_and_LTC_Block_Interval_Times.png?alt=media" alt=""><figcaption></figcaption></figure>

### Asset Specific Details

* On average, Litecoin produces blocks every 2.5 minutes where Ethereum takes around 14 seconds on average

### Example

If for a day, the blocks are:

![](https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-32368c9a52387200cc7bdd6d054960e8014d2072%2FScreen%20Shot%202020-12-13%20at%2010.45.13%20PM.png?alt=media)

The value of BlkIntMean would be (120 + 20 + 160 + 60) / 4 = 90 seconds

### Release History

* Released in the 1.0 release of NDP

### Interpretation

Blockchains with shorter block time (and hence a larger sample size per day) will typically have less variance in mean block interval.

### Availability for Assets

{% embed url="<https://coverage.coinmetrics.io/asset-metrics/BlkIntMean>" %}

***

### description: /timeseries/asset-metrics

## Sum Block Size (in bytes) <a href="#blksizebyte" id="blksizebyte"></a>

### Definition

The sum of the size (in bytes) of all blocks created that interval.

### Dictionary

| Name                      | MetricID    | Unit  | Interval               |
| ------------------------- | ----------- | ----- | ---------------------- |
| Sum Block Size (in bytes) | BlkSizeByte | Bytes | 1 day, 1 block, 1 hour |

### Details

* Only mainchain (non-orphaned/uncles) blocks are counted.
* For chains that use median time, the day is defined using it, otherwise, it’s defined using the block’s timestamps.

### Chart

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-7b1f250072b1572cb5c4c73871aa49782d89969a%2FSum_Block_Size_(in_bytes).png?alt=media" alt=""><figcaption><p><em>Source:</em> <a href="https://charts.coinmetrics.io/network-data/#4297"><em>CM Network Data Charts</em></a></p></figcaption></figure>

### Asset-Specific Details

* This metric is not available for all assets, as some node’s RPC APIs do not expose the size of the blocks.

### Release History

* Released in the 1.0 release of NDP

### Interpretation

* Can be used to measure and compare blockchains' usages and fees
* Can help gauge gas/fee for large transactions:
  * fee per byte = total block fee/block size (byte)

### See Also

* [Mean Block Size (in bytes)](https://docs.coinmetrics.io/asset-metrics/network-usage/blksizemeanbyte)
* [Mean Tx Fee per Byte (native units)](https://docs.coinmetrics.io/asset-metrics/fees-and-revenue/feebytemeanntv)

### Availability for Assets

{% embed url="<https://coverage.coinmetrics.io/asset-metrics/BlkSizeByte>" %}

## Mean Block Size (in bytes) <a href="#blksizemeanbyte" id="blksizemeanbyte"></a>

### Definition

The mean size (in bytes) of all blocks created that interval.

### Dictionary

<table><thead><tr><th>Name</th><th width="165">MetricID</th><th>Unit</th><th>Interval</th></tr></thead><tbody><tr><td>Mean Block Size (in bytes)</td><td>BlkSizeMeanByte</td><td>Bytes</td><td>1 day</td></tr></tbody></table>

### Details

* Only mainchain (non-orphaned/uncles) blocks are counted.
* For chains that use median time, the day is defined using it, otherwise, it’s defined using the block’s timestamps.

### Chart

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-93e3404f40418173cf33a57787a6c0bd992f835f%2FMean_Block_Size_(in_bytes).png?alt=media" alt=""><figcaption><p>Source: <a href="https://charts.coinmetrics.io/network-data/#4298">CM Network Data Charts</a></p></figcaption></figure>

### Asset-Specific Details

* This metric is not available for all assets, as some node’s RPC API do not expose the size of the blocks.

### Release History

* Released in the 1.0 release of NDP

### Interpretation

Mean block size is somewhat arbitrary; block count multiplied by mean block size gives you the total data throughput on a blockchain per day. Blockchains with shorter interblock times will often have smaller blocks but may throughput more data than their higher-latency peers.

### See Also

* [Sum Block Size (in bytes)](https://docs.coinmetrics.io/asset-metrics/network-usage/blksizebyte)

### Availability for Assets

{% embed url="<https://coverage.coinmetrics.io/asset-metrics/BlkSizeMeanByte>" %}

### Definition

The sum weight of all blocks created that interval. Weight is a dimensionless measure of a block’s “size”. It is only applicable for chains that use SegWit (segregated witness).

### Dictionary

| Name             | MetricID   | Unit          | Interval |
| ---------------- | ---------- | ------------- | -------- |
| Sum Block Weight | BlkWghtTot | Dimensionless | 1 day    |

### Details

* Only mainchain (non-orphaned/uncles) blocks are counted.
* For chains that use median time, the day is defined using it, otherwise, it’s defined using the block’s timestamps.

### Chart

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-df56662dade86f1e1f73823b37ba7d205cc597a9%2FSum_Block_Weight.png?alt=media" alt=""><figcaption><p>Source: <a href="https://charts.coinmetrics.io/network-data/#4254">CM Network Data Charts</a></p></figcaption></figure>

### Asset-Specific Details

* This metric is only available for assets that support SegWit.

### Release History

* Released in the 4.9 release of NDP

### Interpretation

Block weight is useful to determine how used a chain is.

### See Also

* [Mean Block Weight](https://docs.coinmetrics.io/asset-metrics/network-usage/blkwghtmean)

### Availability for Assets

{% embed url="<https://coverage.coinmetrics.io/asset-metrics/BlkWghtTot>" %}

***

### description: /timeseries/asset-metrics

## Uncle Blocks Cnt <a href="#blkunccnt" id="blkunccnt"></a>

### Definition

The sum count of uncle blocks mined in that interval.

### Dictionary

| Name             | MetricID  | Unit   | Interval       |
| ---------------- | --------- | ------ | -------------- |
| Uncle Blocks Cnt | BlkUncCnt | Uncles | 1 block, 1 day |

### Details

* Uncle Blocks (also known as Ommer Blocks) are an intrinsic feature of Ethereum.
* Unlike Bitcoin, Ethereum does not discard blocks in situations where multiple miners find a valid block of the same height.
* Instead, Ethereum rewards secondary miners with so-called Uncle Blocks, which effectively represent a share of the work, as well as the reward, of processing transactions.
* Uncle blocks are not included in the asset’s main chain but are referenced by main chain blocks. Both the main chain block and uncle block miners get an extra reward for this.

### Chart

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-006548ea4b52b4a0ceeb4245f58e46b3efd2cb61%2FUncle_Blocks_Cnt.png?alt=media" alt=""><figcaption><p>Source: <a href="https://charts.coinmetrics.io/network-data/#4237">CM Network Data Charts</a></p></figcaption></figure>

### Asset-Specific Details

* This metric is only relevant to ETH and ETC

### Release History

* Released in the 4.3 release of NDP
* Deprecated post the Ethereum Merge

### Interpretation

* The more uncle blocks there are, the more uncertainty there might be around the finality of those related payments

### See Also

* [Miner Revenue from Uncle Blocks (%)](https://docs.coinmetrics.io/asset-metrics/network-usage/blkuncrevpct)
* [Uncle Reward (native units)](https://docs.coinmetrics.io/asset-metrics/network-usage/blkuncrwd)
* [Uncle Reward (USD)](https://docs.coinmetrics.io/asset-metrics/network-usage/blkuncrwdusd)

### Availability for Assets

{% embed url="<https://coverage.coinmetrics.io/asset-metrics/BlkUncCnt>" %}

## Miner Revenue from Uncle Blocks (%) <a href="#blkuncrevpct" id="blkuncrevpct"></a>

### Definition

The percentage of miner revenue exclusively derived from creating and including uncle blocks in that interval. This is equal to the sum of the uncle inclusion reward (for the main chain block miner) and the uncle rewards (for the uncle block miners) divided by the miner revenue.

### Dictionary

| Name                                | MetricID     | Unit          | Interval |
| ----------------------------------- | ------------ | ------------- | -------- |
| Miner Revenue from Uncle Blocks (%) | BlkUncRevPct | Dimensionless | 1 day    |

### Details

* Uncle Blocks (also known as Ommer Blocks) are an intrinsic feature of Ethereum.
* Unlike Bitcoin, Ethereum does not discard blocks in situations where multiple miners find a valid block of the same height.
* Instead, Ethereum rewards secondary miners with so-called Uncle Blocks, which effectively represent a share of the work, as well as the reward, of processing transactions.
* This metric measures the proportion of rewards that resulted from Uncle Blocks.

### Chart

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-e92f8fb732e797d5d40ea44521ad499cc2a9cb80%2FMiner_Revenue_from_Uncle_Blocks_(_).png?alt=media" alt=""><figcaption><p>Source: <a href="https://charts.coinmetrics.io/network-data/#4250">CM Network Data Charts</a></p></figcaption></figure>

### Asset-Specific Details

* This metric is only relevant to ETH & ETC

### Release History

* Release Version: NDP-EOD 4.8 (Nov, 2020)
* Deprecated post the Ethereum Merge

### See Also

* [Uncle Blocks Cnt](https://docs.coinmetrics.io/asset-metrics/network-usage/blkunccnt)
* [Uncle Reward (native units)](https://docs.coinmetrics.io/asset-metrics/network-usage/blkuncrwd)
* [Uncle Reward (USD)](https://docs.coinmetrics.io/asset-metrics/network-usage/blkuncrwdusd)

### Availability for Assets

{% embed url="<https://coverage.coinmetrics.io/asset-metrics/BlkUncRevPct>" %}

## Uncle Reward <a href="#blkuncrwd" id="blkuncrwd"></a>

### Definition

The sum rewarded to miners for creating and including uncle blocks in that interval. This includes the uncle inclusion reward (for the main chain block miner) and the uncle rewards (for the uncle block miners).

| Name                        | MetricID     | Unit         | Interval       |
| --------------------------- | ------------ | ------------ | -------------- |
| Uncle Reward (native units) | BlkUncRwd    | Native Units | 1 block, 1 day |
| Uncle Reward (USD)          | BlkUncRwdUSD | Native Units | 1 block, 1 day |

### Details

* Uncle Blocks (also known as Ommer Blocks) are an intrinsic feature of Ethereum.
* Unlike Bitcoin, Ethereum does not discard blocks in situations where multiple miners find a valid block of the same height.
* Instead, Ethereum rewards secondary miners with so-called Uncle Blocks, which effectively represent a share of the work, as well as the reward, of processing transactions.
* Uncle blocks are not included in the asset’s main chain but are referenced by main chain blocks. Both the main chain block and uncle block miners get an extra reward for this.

### Asset-Specific Details

* Only available for ETH and ETC

### Release History

* Released in the 4.3 release of NDP

### Availability for Assets

{% embed url="<https://coverage.coinmetrics.io/asset-metrics/BlkUncRwd>" %}

## Mean Block Weight <a href="#blkwghtmean" id="blkwghtmean"></a>

### Definition

The mean weight of all blocks created that interval. Weight is a dimensionless measure of a block’s “size”. It is only applicable for chains that use SegWit (segregated witness).

### Dictionary

| Name              | MetricID    | Unit          | Interval |
| ----------------- | ----------- | ------------- | -------- |
| Mean Block Weight | BlkWghtMean | Dimensionless | 1 day    |

### Details

* Only mainchain (non-orphaned/uncles) blocks are counted.
* For chains that use median time, the day is defined using it, otherwise, it’s defined using the block’s timestamps.

### Chart

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-04d3c312a581eaad6230886131b11a309c23da51%2FMean_Block_Weight.png?alt=media" alt=""><figcaption><p>Source: <a href="https://charts.coinmetrics.io/network-data/#4251">CM Network Data Charts</a></p></figcaption></figure>

### Asset-Specific Details

* This metric is only available for assets that support SegWit.

### Release History

* Released in the 4.2 release of NDP

### Interpretation

Block weight is useful to determine how used a chain is. If the mean block weight is close to the maximum block weight possible, then the chain is close to 100% utilization.

### See Also

* [Sum Block Weight](https://docs.coinmetrics.io/asset-metrics/network-usage/blkwghttot?q=Sum+Block+Weight)

### Availability for Assets

{% embed url="<https://coverage.coinmetrics.io/asset-metrics/BlkWghtMean>" %}

## Sum Block Weight <a href="#blkwghttot" id="blkwghttot"></a>

### Definition

The sum weight of all blocks created that interval. Weight is a dimensionless measure of a block’s “size”. It is only applicable for chains that use SegWit (segregated witness).

### Dictionary

| Name             | MetricID   | Unit          | Interval |
| ---------------- | ---------- | ------------- | -------- |
| Sum Block Weight | BlkWghtTot | Dimensionless | 1 day    |

### Details

* Only mainchain (non-orphaned/uncles) blocks are counted.
* For chains that use median time, the day is defined using it, otherwise, it’s defined using the block’s timestamps.

### Chart

<figure><img src="https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-df56662dade86f1e1f73823b37ba7d205cc597a9%2FSum_Block_Weight.png?alt=media" alt=""><figcaption><p>Source: <a href="https://charts.coinmetrics.io/network-data/#4254">CM Network Data Charts</a></p></figcaption></figure>

### Asset-Specific Details

* This metric is only available for assets that support SegWit.

### Release History

* Released in the 4.9 release of NDP

### Interpretation

Block weight is useful to determine how used a chain is.

### See Also

* [Mean Block Weight](https://docs.coinmetrics.io/asset-metrics/network-usage/blkwghtmean)

### Availability for Assets

{% embed url="<https://coverage.coinmetrics.io/asset-metrics/BlkWghtTot>" %}

## MEV Block Count <a href="#blkwghttot" id="blkwghttot"></a>

### Definition

The sum count of MEV-related blocks created that interval that were included in the main (base) chain.

### Dictionary

| Name            | MetricID  | Unit   | Interval |
| --------------- | --------- | ------ | -------- |
| MEV Block Count | MevBlkCnt | Blocks | 1 day    |

### Details

* Only mainchain (non-orphaned/uncles) blocks are counted.
* For chains that use median time, the day is defined using it, otherwise, it’s defined using the block’s timestamps.

### Asset-Specific Details

* This metric is only available for Solana.
* For Solana, the entire block is considered MEV when the leader of the slot is running the `Jito-Solana` client.

### Availability for Assets

{% embed url="<https://coverage.coinmetrics.io/asset-metrics-v2/MevBlkCnt>" %}

## API Endpoints

Block metrics can be accessed using these endpoints:

* `timeseries/asset-metrics`

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

{% openapi src="<https://2398817338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO23j33wWGzm0NrZseN%2Fuploads%2Fgit-blob-1522f16027d90845f8750dd9c51c03b8e7aab67f%2Fopenapi.yaml?alt=media>" 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-1522f16027d90845f8750dd9c51c03b8e7aab67f%2Fopenapi.yaml?alt=media)
{% endopenapi %}

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

```shell
curl --compressed "https://api.coinmetrics.io/v4/timeseries/asset-metrics?metrics=BlkCnt&assets=btc&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=BlkCnt&assets=btc&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="BlkCnt", 
        assets="btc",
    ).to_dataframe()
)
```

{% endtab %}
{% endtabs %}
