> ## 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.

# Block Times

## Contents

* [Time between blocks (time\_inter\_block )](https://kb.talostrading.com/coinmetrics/network-data/network-data-overview/kri/block-times.md#time_inter_block)
* [Time Since Last Block (time\_since\_last\_block)](https://kb.talostrading.com/coinmetrics/network-data/network-data-overview/kri/block-times.md#time_since_last_block)

## Time between blocks

**Definition**

The time elapsed between the block at the tip of the chain (the most recent block) and its predecessor.

**Dictionary**

| Name | MetricID | Unit | Interval |
| - | - | - | - |
| Time between blocks | time\_inter\_block | seconds | 1 minute |

**Methodology**

The metric is computed as the time difference between the arrival of the block at the chain tip as seen by our nodes, and the arrival of the previous block.

**Available Assets**

Bitcoin (BTC), Ethereum (ETH)

**Sample Query**

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

## Time Since Last Block

**Definition**

The time elapsed between the current time and the last block at the tip of the chain (the most recent block).

**Dictionary**

| Name | MetricID | Category | Sub-category | Type | Unit | Interval |
| - | - | - | - | - | - | - |
| Time since last block | time\_since\_last\_block | KRI | Block Attributes | Delta | seconds | 1 minute |

**Methodology**

The metric is computed as the time difference between the arrival of the block at the chain tip as seen by our nodes, and the current time. As a timestamp for the block at the chain tip this metric uses the concept of miner\_time (for more on the differences between miner\_time and consensus\_time refer to our [wiki article](https://kb.talostrading.com/coinmetrics/network-data/on-chain-basics.md) on normalizing timestamps). For Bitcoin, miner\_time can be set arbitrarily by miners which can impact the value of this metric.

**Available Assets**

Bitcoin (BTC), Ethereum (ETH)

**Sample Query**

[https://api.coinmetrics.io/v4/timeseries/asset-metrics?api\_key=%3Cyour\_key%3E\&assets=btc,eth\&frequency=1m\&limit\_per\_asset=1\&metrics=time\_since\_last\_block\&pretty=true](https://api.coinmetrics.io/v4/timeseries/asset-metrics?api_key=%3Cyour_key%3E\&assets=btc,eth\&frequency=1m\&limit_per_asset=1\&metrics=time_since_last_block\&pretty=true)

## API Endpoints

Block time metrics can be accessed using these endpoints:

* `timeseries/asset-metrics`

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

`GET /timeseries/asset-metrics`

> [tab] Shell
>
> ```shell theme={null}
> curl --compressed "https://api.coinmetrics.io/v4/timeseries/asset-metrics?metrics=time_inter_block&assets=btc&frequency=1m&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=time_inter_block&assets=btc&frequency=1m&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="time_inter_block", 
>         assets="btc",
>     ).to_dataframe()
> )
> ```
