# Flows

## Contents

* [Flows Received by Miners](#flowminerin0hopall)
* [Flows Received One Hop from Miners](#flowminerin1hopall)
* [Miner Net Flows](#flowminernet0hopall)
* [Net Flows One Hop from Miners](#flowminernet1hopall)
* [Flows Sent by Miners](#flowminerout0hopall)
* [Flows Sent One Hop from Miners](#flowminerout1hopall)
* [Miner Rolling Inventory, 30 day (%)](#mri0hopall30d)
* [Miner One Hop Rolling Inventory, 30 day (%)](#mri1hopall30d)

## Flows Received by Miners <a href="#flowminerin0hopall" id="flowminerin0hopall"></a>

### Definition

The sum of block rewards, fees, and other transfers received by all mining entities during an interval, excluding transfers from another mining entity. A mining entity is defined as an address that has been credited from a transaction debiting the 'FEES' or 'ISSUANCE' accounts in accordance with Coin Metric’s Universal Blockchain Data Model (UBDM).

| Name                                    | MetricID              | Unit         | Interval |
| --------------------------------------- | --------------------- | ------------ | -------- |
| Flows Received by Miners (native units) | FlowMinerIn0HopAllNtv | Native units | 1 day    |
| Flows Received by Miners (USD)          | FlowMinerIn0HopAllUSD | USD          | 1 day    |

### Details

* This metric is not computed as the sum of block rewards and fees collected by all mining entities during an interval.
* For more details on how this metric is computed, please refer to our blog post introducing [Miner Flows](https://coinmetrics.substack.com/p/coin-metrics-state-of-the-network-3e2)

### Asset-Specific Details

* This metric will initially only be available for Bitcoin.

### Release History

* Release Version: 4.8 (Nov, 2020)

### Availability for Assets

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

## Flows Received One Hop from Miners <a href="#flowminerin1hopall" id="flowminerin1hopall"></a>

### Defintion

The sum of block rewards, fees, and other transfers received by all addresses within one hop of a mining entity during an interval, excluding transfers from another address within one hop of a mining entity. An address within one hop of a mining entity is defined as an address that has been credited from a transaction debiting the 'FEES' or 'ISSUANCE' accounts in accordance with Coin Metric’s Universal Blockchain Data Model (UBDM).

| Name                                              | MetricID              | Unit         | Interval |
| ------------------------------------------------- | --------------------- | ------------ | -------- |
| Flows Received One Hop from Miners (native units) | FlowMinerIn1HopAllNtv | Native units | 1 day    |
| Flows Received One Hop from Miners (USD)          | FlowMinerIn1HopAllUSD | USD          | 1 day    |
|                                                   |                       |              |          |

**Details**

* This metric is not computed as the sum of block rewards and fees collected by addresses within one hop of a mining entity during an interval.
* For more details on how this metric is computed, please refer to our blog post introducing [Miner Flows](https://coinmetrics.substack.com/p/coin-metrics-state-of-the-network-3e2)

### Asset-Specific Details

* This metric will initially only be available for Bitcoin.

### Release History

* Release Version: NDP-EOD 4.8 (Nov, 2020)

### Availability for Assets

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

## Miner Net Flows <a href="#flowminernet0hopall" id="flowminernet0hopall"></a>

### Definition

The net value sent or received by a mining entity in native units . A mining entity is defined as an address that has been credited from a transaction debiting the 'FEES' or 'ISSUANCE' accounts in accordance with Coin Metric’s Universal Blockchain Data Model (UBDM).

| Name                           | MetricID               | Unit         | Interval |
| ------------------------------ | ---------------------- | ------------ | -------- |
| Miner Net Flows (native units) | FlowMinerNet0HopAllNtv | Native units | 1 day    |
| Miner Net Flows (native units) | FlowMinerNet0HopAllUSD | USD          | 1 day    |

### Details

* For more details on how this metric is computed, please refer to our blog post introducing [Miner Flows](https://coinmetrics.substack.com/p/coin-metrics-state-of-the-network-3e2)

### Asset-Specific Details

* This metric will initially only be available for Bitcoin.

### Release History

* Release Version: NDP-EOD 4.8 (Nov, 2020)

### Availability for Assets

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

## Net Flows One Hop from Miners <a href="#flowminernet1hopall" id="flowminernet1hopall"></a>

### Definition

The difference between the sum of block rewards, fees, and other transfers received by all addresses within one hop of a mining entity during an interval, excluding transfers to another address within one hop of a mining entity, and those sent. An address within one hop of a mining entity is defined as an address that has been credited from a transaction debiting the 'FEES' or 'ISSUANCE' accounts in accordance with Coin Metric’s Universal Blockchain Data Model (UBDM), or any address that has been credited in a transaction sent by such an address.

| Name                                         | MetricID               | Unit         | Interval |
| -------------------------------------------- | ---------------------- | ------------ | -------- |
| Net Flows One Hop from Miners (native units) | FlowMinerNet1HopAllNtv | Native units | 1 day    |
| Net Flows One Hop from Miners (USD)          | FlowMinerNet1HopAllUSD | USD          | 1 day    |

### Details

* For more details on how this metric is computed, please refer to our blog post introducing [Miner Flows](https://coinmetrics.substack.com/p/coin-metrics-state-of-the-network-3e2)

### Asset-Specific Details

* This metric will initially only be available for Bitcoin.

### Release History

* Release Version: NDP-EOD 4.8 (Nov, 2020)

### Availability for Assets

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

## Flows Sent by Miners <a href="#flowminerout0hopall" id="flowminerout0hopall"></a>

### Definition

The sum of block rewards, fees, and other transfers received by all mining entities during an interval, excluding transfers from another mining entity. A mining entity is defined as an address that has been credited from a transaction debiting the 'FEES' or 'ISSUANCE' accounts in accordance with Coin Metric’s Universal Blockchain Data Model (UBDM).

| Name                                | MetricID               | Unit         | Interval |
| ----------------------------------- | ---------------------- | ------------ | -------- |
| Flows Sent by Miners (native units) | FlowMinerOut0HopAllNtv | Native units | 1 day    |
| Flows Sent by Miners (USD)          | FlowMinerOut0HopAllUSD | USD          | 1 day    |

### Details

* For more details on how this metric is computed, please refer to our blog post introducing [Miner Flows](https://coinmetrics.substack.com/p/coin-metrics-state-of-the-network-3e2)

### Asset-Specific Details

* This metric will initially only be available for Bitcoin.

### Release History

* Release Version: NDP-EOD 4.8 (Nov, 2020)

### Availability for Assets

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

## Flows Sent One Hop from Miners <a href="#flowminerout1hopall" id="flowminerout1hopall"></a>

### Definition

The sum of block rewards, fees, and other transfers sent by all addresses within one hop of a mining entity during an interval, excluding transfers to another address within one hop of a mining entity. An address within one hop of a mining entity is defined as an address that has been credited from a transaction debiting the 'FEES' or 'ISSUANCE' accounts in accordance with Coin Metric’s Universal Blockchain Data Model (UBDM), or any address that has been credited in a transaction sent by such an address.

| Name                                          | MetricID               | Unit         | Interval |
| --------------------------------------------- | ---------------------- | ------------ | -------- |
| Flows Sent One Hop from Miners (native units) | FlowMinerOut1HopAllNtv | Native units | 1 day    |
| Flows Sent One Hop from Miners (USD)          | FlowMinerOut1HopAllUSD | USD          | 1 day    |

### Details

* For more details on how this metric is computed, please refer to our blog post introducing [Miner Flows](https://coinmetrics.substack.com/p/coin-metrics-state-of-the-network-3e2)

### Asset-Specific Details

* This metric will initially only be available for Bitcoin.

### Release History

* Release Version: NDP-EOD 4.8 (Nov, 2020)

### Availability for Assets

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

## Miner Rolling Inventory, 30 day (%) <a href="#mri0hopall30d" id="mri0hopall30d"></a>

### Definition

The outflow from all mining entities divided by miner revenue, over a rolling window of 30 days.

| Name                                | MetricID      | Unit       | Interval |
| ----------------------------------- | ------------- | ---------- | -------- |
| Miner Rolling Inventory, 30 day (%) | MRI0HopAll30d | Percentage | 30 days  |

### Details

* This metric is computed as FlowMinerOut0HopAllNtv / RevNtv over a rolling window of 30 days

### Asset-specific Details

* This metric will initially only be available for Bitcoin.

### Release History

* Release Version: NDP-EOD 4.8 (Nov, 2020)

### Availability for Assets

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

## Miner One Hop Rolling Inventory, 30 day (%) <a href="#mri1hopall30d" id="mri1hopall30d"></a>

### Definition

The outflow from all addresses within one hop of a mining entity divided by miner revenue, over a rolling window of 30 days.

### Dictionary

| Name                                        | MetricID      | Unit       | Interval |
| ------------------------------------------- | ------------- | ---------- | -------- |
| Miner One Hop Rolling Inventory, 30 day (%) | MRI1HopAll30d | Percentage | 30 days  |

### Details

* This metric is computed as FlowMinerOut1HopAllNtv / RevNtv over a rolling window of 30 days

### Asset-Specific Details

* This metric will initially only be available for Bitcoin.

### Release History

* Release Version: NDP-EOD 4.8 (Nov, 2020)

### Availability for Assets

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

## API Endpoints

Flows metrics can be accessed using these endpoints:

* `timeseries/asset-metrics`

and by passing in the metric ID's `FlowMinerIn0HopAll*`, `FlowMinerIn1HopAll*` `FlowMinerNet0HopAll*``FlowMinerNet0HopAll*``FlowMinerOut0HopAll*``FlowMinerOut0HopAll*`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=FlowMinerIn0HopAllNtv&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=FlowMinerIn0HopAllNtv&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="FlowMinerIn0HopAllNtv", 
        assets="btc",
    ).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/mining/flows.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.
