# BTC Miner Flows

This namespace contains endpoints to retrieve data related to Bitcoin miners(i.e. mining pools and its participants). We provide metrics related to miner reserves, inflows, outflows, hashrate, revenue, workers, etc. We constantly keep updating new miner wallets, which means that there can be slight modification in values especially for recent data points. The update is done in periodic and automatic way: Tuesday 00:00 UTC every week. Supported miners can be found in the `/btc/status/entity-list` endpoint. In addition to that, we support the following aggregated miners:

<br>

#### Supported Aggregated Miners

| Name       | Miner       | Status    |
| ---------- | ----------- | --------- |
| All Miners | `all_miner` | Validated |

<br>

> **Note:** This endpoint does not support Point-In-Time (PIT) accuracy due to periodic updates to wallet address clustering. Historical data may change as new miners wallets are discovered, added, and validated.

<br>

## Reserve

> This endpoint returns the full historical on-chain balance of Bitcoin mining pools.

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Miner Flows","description":"This namespace contains endpoints to retrieve data related to Bitcoin miners(i.e. mining pools and its participants). We provide metrics related to miner reserves, inflows, outflows, hashrate, revenue, workers, etc.\nWe constantly keep updating new miner wallets, which means that there can be slight modification in values especially for recent data points.\nThe update is done in periodic and automatic way: Tuesday 00:00 UTC every week.\nSupported miners can be found in the `/btc/status/entity-list` endpoint.\nIn addition to that, we support the following aggregated miners:\n\n<br>\n\n### Supported Aggregated Miners\n\n| Name           |   Miner     |   Status    |\n|----------------|--------------|-------------|\n| All Miners     | `all_miner`    | Validated   |\n\n<br>\n\n> **Note:** This endpoint does not support Point-In-Time (PIT) accuracy due to periodic updates to wallet address clustering. Historical data may change as new miners wallets are discovered, added, and validated.\n\n<br>"}],"servers":[{"url":"https://api.cryptoquant.com/v1/","description":"Default server"}],"security":[{"Access Token":[]}],"components":{"securitySchemes":{"Access Token":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"For each API request, include this HTTP header:\n`Authorization` with the `Bearer {access_token}`. Bearer access token is the type of HTTP Authorization.  You have to include access token to the HTTP header and note that leading bearer is required.\nYou must include your access token in HTTP header in every request you make. The token is unique, issued for each client, and regularly changed(once a year). To obtain an access token, please [upgrade your plan](https://cryptoquant.com/pricing) to Professional or Premium plan. You'll be able to see your access token on the [API tab](https://cryptoquant.com/settings/api) of your profile page after the subscription."}},"parameters":{"miner":{"description":"A mining pool from the table that we support. [See here](#tag/BTC-Miner-Flows).","explode":false,"in":"query","name":"miner","required":true,"schema":{"type":"string"},"style":"form"},"window_dbh":{"description":"Currently we support `day`, `hour`, and `block`.","explode":false,"in":"query","name":"window","schema":{"type":"string","default":"day"},"style":"form"},"from":{"description":"This defines the starting time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the earliest time.","explode":false,"in":"query","name":"from","required":false,"schema":{"YYYYMMDDTHHMMSS":{"type":"string"}},"style":"form"},"to":{"description":"This defines the ending time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the latest time.","explode":false,"in":"query","name":"to","required":false,"schema":{"YYYYMMDDTHHMMSS":{"type":"string"}},"style":"form"},"limit":{"description":"The maximum number of entries to return before the latest data point (or before `to` if specified). This field ranges from 1 to 100,000.","explode":false,"in":"query","name":"limit","required":false,"schema":{"type":"integer","default":100,"minimum":1,"maximum":100000},"style":"form"},"format":{"description":"A format type about return message type. Supported formats are json, csv.","explode":false,"in":"query","name":"format","required":false,"schema":{"type":"string","default":"json"},"style":"form"}},"responses":{"responses_Reserve":{"description":"The amount of BTC on the given miner on this window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schemas_ReserveResponse"}}}}},"schemas":{"schemas_ReserveResponse":{"type":"object","required":["status","result"],"properties":{"status":{"$ref":"#/components/schemas/Status"},"result":{"type":"object","required":["window","data"],"properties":{"window":{"$ref":"#/components/schemas/Window"},"data":{"type":"array","items":{"type":"object","required":["reserve","reserve_usd"],"properties":{"blockheight":{"$ref":"#/components/schemas/Blockheight"},"date":{"$ref":"#/components/schemas/Date"},"datetime":{"$ref":"#/components/schemas/Datetime_H"},"reserve":{"type":"decimal","description":"The amount of BTC on a given mining pool."},"reserve_usd":{"type":"decimal","description":"The USD value of BTC held by a mining pool."}}}}}}}},"Status":{"type":"object","description":"The status object is return with most of requests and indicates if the request was successful. If it is not successful, error information is included.","properties":{"code":{"type":"integer","format":"int32","description":"HTTP status code"},"message":{"type":"string","description":"Text description of the error or success."}},"required":["code","message"]},"Window":{"type":"string","description":"The size of window. It can be day or block, and it depends on the user request."},"Blockheight":{"type":"string","description":"The height of the block. This optional field only appears when window=block is used."},"Date":{"type":"string","description":"The date in YYYY-DD-MM. This optional field only appears when window=day is used."},"Datetime_H":{"type":"string","description":"The date and time formatted as YYYY-MM-DD HH:MM:SS (UTC time). This field only appears when window=block or window=hour is used."}}},"paths":{"/btc/miner-flows/reserve":{"get":{"tags":["BTC Miner Flows"],"summary":"Reserve","description":"This endpoint returns the full historical on-chain balance of Bitcoin mining pools.","operationId":"BTCgetReserveMF","parameters":[{"$ref":"#/components/parameters/miner"},{"$ref":"#/components/parameters/window_dbh"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/format"}],"responses":{"200":{"$ref":"#/components/responses/responses_Reserve"}}}}}}
```

## Netflow

> The difference between coins flowing into mining pools and flowing out of mining pools. Netflow usually helps us to figure out an increase of idle coins waiting to be traded in a certain time frame.

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Miner Flows","description":"This namespace contains endpoints to retrieve data related to Bitcoin miners(i.e. mining pools and its participants). We provide metrics related to miner reserves, inflows, outflows, hashrate, revenue, workers, etc.\nWe constantly keep updating new miner wallets, which means that there can be slight modification in values especially for recent data points.\nThe update is done in periodic and automatic way: Tuesday 00:00 UTC every week.\nSupported miners can be found in the `/btc/status/entity-list` endpoint.\nIn addition to that, we support the following aggregated miners:\n\n<br>\n\n### Supported Aggregated Miners\n\n| Name           |   Miner     |   Status    |\n|----------------|--------------|-------------|\n| All Miners     | `all_miner`    | Validated   |\n\n<br>\n\n> **Note:** This endpoint does not support Point-In-Time (PIT) accuracy due to periodic updates to wallet address clustering. Historical data may change as new miners wallets are discovered, added, and validated.\n\n<br>"}],"servers":[{"url":"https://api.cryptoquant.com/v1/","description":"Default server"}],"security":[{"Access Token":[]}],"components":{"securitySchemes":{"Access Token":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"For each API request, include this HTTP header:\n`Authorization` with the `Bearer {access_token}`. Bearer access token is the type of HTTP Authorization.  You have to include access token to the HTTP header and note that leading bearer is required.\nYou must include your access token in HTTP header in every request you make. The token is unique, issued for each client, and regularly changed(once a year). To obtain an access token, please [upgrade your plan](https://cryptoquant.com/pricing) to Professional or Premium plan. You'll be able to see your access token on the [API tab](https://cryptoquant.com/settings/api) of your profile page after the subscription."}},"parameters":{"miner":{"description":"A mining pool from the table that we support. [See here](#tag/BTC-Miner-Flows).","explode":false,"in":"query","name":"miner","required":true,"schema":{"type":"string"},"style":"form"},"window_dbh":{"description":"Currently we support `day`, `hour`, and `block`.","explode":false,"in":"query","name":"window","schema":{"type":"string","default":"day"},"style":"form"},"from":{"description":"This defines the starting time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the earliest time.","explode":false,"in":"query","name":"from","required":false,"schema":{"YYYYMMDDTHHMMSS":{"type":"string"}},"style":"form"},"to":{"description":"This defines the ending time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the latest time.","explode":false,"in":"query","name":"to","required":false,"schema":{"YYYYMMDDTHHMMSS":{"type":"string"}},"style":"form"},"limit":{"description":"The maximum number of entries to return before the latest data point (or before `to` if specified). This field ranges from 1 to 100,000.","explode":false,"in":"query","name":"limit","required":false,"schema":{"type":"integer","default":100,"minimum":1,"maximum":100000},"style":"form"},"format":{"description":"A format type about return message type. Supported formats are json, csv.","explode":false,"in":"query","name":"format","required":false,"schema":{"type":"string","default":"json"},"style":"form"}},"responses":{"responses_Netflow":{"description":"netflow_total","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schemas_NetflowResponse"}}}}},"schemas":{"schemas_NetflowResponse":{"type":"object","required":["status","result"],"properties":{"status":{"$ref":"#/components/schemas/Status"},"result":{"type":"object","required":["window","data"],"properties":{"window":{"$ref":"#/components/schemas/Window_DBH"},"data":{"type":"array","items":{"type":"object","required":["netflow_total"],"properties":{"blockheight":{"$ref":"#/components/schemas/Blockheight"},"date":{"$ref":"#/components/schemas/Date"},"datetime":{"$ref":"#/components/schemas/Datetime_H"},"netflow_total":{"type":"decimal","description":"The difference between coins flowing into/out of mining pools."}}}}}}}},"Status":{"type":"object","description":"The status object is return with most of requests and indicates if the request was successful. If it is not successful, error information is included.","properties":{"code":{"type":"integer","format":"int32","description":"HTTP status code"},"message":{"type":"string","description":"Text description of the error or success."}},"required":["code","message"]},"Window_DBH":{"type":"string","description":"The size of window. It can be day, hour, or block, and it depends on the user request."},"Blockheight":{"type":"string","description":"The height of the block. This optional field only appears when window=block is used."},"Date":{"type":"string","description":"The date in YYYY-DD-MM. This optional field only appears when window=day is used."},"Datetime_H":{"type":"string","description":"The date and time formatted as YYYY-MM-DD HH:MM:SS (UTC time). This field only appears when window=block or window=hour is used."}}},"paths":{"/btc/miner-flows/netflow":{"get":{"tags":["BTC Miner Flows"],"summary":"Netflow","description":"The difference between coins flowing into mining pools and flowing out of mining pools. Netflow usually helps us to figure out an increase of idle coins waiting to be traded in a certain time frame.","operationId":"BTCgetMinerNetflow","parameters":[{"$ref":"#/components/parameters/miner"},{"$ref":"#/components/parameters/window_dbh"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/format"}],"responses":{"200":{"$ref":"#/components/responses/responses_Netflow"}}}}}}
```

## Inflow

> This endpoint returns the inflow of BTC into mining pool wallets for as far back as we track. The average inflow is the average transaction value for transactions flowing into mining pool wallets on a given day.

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Miner Flows","description":"This namespace contains endpoints to retrieve data related to Bitcoin miners(i.e. mining pools and its participants). We provide metrics related to miner reserves, inflows, outflows, hashrate, revenue, workers, etc.\nWe constantly keep updating new miner wallets, which means that there can be slight modification in values especially for recent data points.\nThe update is done in periodic and automatic way: Tuesday 00:00 UTC every week.\nSupported miners can be found in the `/btc/status/entity-list` endpoint.\nIn addition to that, we support the following aggregated miners:\n\n<br>\n\n### Supported Aggregated Miners\n\n| Name           |   Miner     |   Status    |\n|----------------|--------------|-------------|\n| All Miners     | `all_miner`    | Validated   |\n\n<br>\n\n> **Note:** This endpoint does not support Point-In-Time (PIT) accuracy due to periodic updates to wallet address clustering. Historical data may change as new miners wallets are discovered, added, and validated.\n\n<br>"}],"servers":[{"url":"https://api.cryptoquant.com/v1/","description":"Default server"}],"security":[{"Access Token":[]}],"components":{"securitySchemes":{"Access Token":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"For each API request, include this HTTP header:\n`Authorization` with the `Bearer {access_token}`. Bearer access token is the type of HTTP Authorization.  You have to include access token to the HTTP header and note that leading bearer is required.\nYou must include your access token in HTTP header in every request you make. The token is unique, issued for each client, and regularly changed(once a year). To obtain an access token, please [upgrade your plan](https://cryptoquant.com/pricing) to Professional or Premium plan. You'll be able to see your access token on the [API tab](https://cryptoquant.com/settings/api) of your profile page after the subscription."}},"parameters":{"miner":{"description":"A mining pool from the table that we support. [See here](#tag/BTC-Miner-Flows).","explode":false,"in":"query","name":"miner","required":true,"schema":{"type":"string"},"style":"form"},"window_dbh":{"description":"Currently we support `day`, `hour`, and `block`.","explode":false,"in":"query","name":"window","schema":{"type":"string","default":"day"},"style":"form"},"from":{"description":"This defines the starting time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the earliest time.","explode":false,"in":"query","name":"from","required":false,"schema":{"YYYYMMDDTHHMMSS":{"type":"string"}},"style":"form"},"to":{"description":"This defines the ending time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the latest time.","explode":false,"in":"query","name":"to","required":false,"schema":{"YYYYMMDDTHHMMSS":{"type":"string"}},"style":"form"},"limit":{"description":"The maximum number of entries to return before the latest data point (or before `to` if specified). This field ranges from 1 to 100,000.","explode":false,"in":"query","name":"limit","required":false,"schema":{"type":"integer","default":100,"minimum":1,"maximum":100000},"style":"form"},"format":{"description":"A format type about return message type. Supported formats are json, csv.","explode":false,"in":"query","name":"format","required":false,"schema":{"type":"string","default":"json"},"style":"form"}},"responses":{"responses_Inflow":{"description":"inflow_total, inflow_top10, inflow_mean","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schemas_InflowResponse"}}}}},"schemas":{"schemas_InflowResponse":{"type":"object","required":["status","result"],"properties":{"status":{"$ref":"#/components/schemas/Status"},"result":{"type":"object","required":["window","data"],"properties":{"window":{"$ref":"#/components/schemas/Window"},"data":{"type":"array","items":{"type":"object","required":["inflow_total","inflow_top10","inflow_mean"],"properties":{"blockheight":{"$ref":"#/components/schemas/Blockheight"},"date":{"$ref":"#/components/schemas/Date"},"datetime":{"$ref":"#/components/schemas/Datetime_H"},"inflow_total":{"type":"decimal","description":"The total amount of BTC transferred to the miner."},"inflow_top10":{"type":"decimal","description":"The total BTC amount of top 10 transactions (in terms of total BTC sent) flowing into miner wallets for every day that the miner wallets we track have been live on the blockchain."},"inflow_mean":{"type":"decimal","description":"The mean of tokens per transactions sent to a miner."}}}}}}}},"Status":{"type":"object","description":"The status object is return with most of requests and indicates if the request was successful. If it is not successful, error information is included.","properties":{"code":{"type":"integer","format":"int32","description":"HTTP status code"},"message":{"type":"string","description":"Text description of the error or success."}},"required":["code","message"]},"Window":{"type":"string","description":"The size of window. It can be day or block, and it depends on the user request."},"Blockheight":{"type":"string","description":"The height of the block. This optional field only appears when window=block is used."},"Date":{"type":"string","description":"The date in YYYY-DD-MM. This optional field only appears when window=day is used."},"Datetime_H":{"type":"string","description":"The date and time formatted as YYYY-MM-DD HH:MM:SS (UTC time). This field only appears when window=block or window=hour is used."}}},"paths":{"/btc/miner-flows/inflow":{"get":{"tags":["BTC Miner Flows"],"summary":"Inflow","description":"This endpoint returns the inflow of BTC into mining pool wallets for as far back as we track. The average inflow is the average transaction value for transactions flowing into mining pool wallets on a given day.","operationId":"BTCgetInflowMF","parameters":[{"$ref":"#/components/parameters/miner"},{"$ref":"#/components/parameters/window_dbh"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/format"}],"responses":{"200":{"$ref":"#/components/responses/responses_Inflow"}}}}}}
```

## Outflow

> This endpoint returns the outflow of BTC into mining pool wallets for as far back as we track. The average outflow is the average transaction value for transactions flowing out of mining pool wallets on a given day.

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Miner Flows","description":"This namespace contains endpoints to retrieve data related to Bitcoin miners(i.e. mining pools and its participants). We provide metrics related to miner reserves, inflows, outflows, hashrate, revenue, workers, etc.\nWe constantly keep updating new miner wallets, which means that there can be slight modification in values especially for recent data points.\nThe update is done in periodic and automatic way: Tuesday 00:00 UTC every week.\nSupported miners can be found in the `/btc/status/entity-list` endpoint.\nIn addition to that, we support the following aggregated miners:\n\n<br>\n\n### Supported Aggregated Miners\n\n| Name           |   Miner     |   Status    |\n|----------------|--------------|-------------|\n| All Miners     | `all_miner`    | Validated   |\n\n<br>\n\n> **Note:** This endpoint does not support Point-In-Time (PIT) accuracy due to periodic updates to wallet address clustering. Historical data may change as new miners wallets are discovered, added, and validated.\n\n<br>"}],"servers":[{"url":"https://api.cryptoquant.com/v1/","description":"Default server"}],"security":[{"Access Token":[]}],"components":{"securitySchemes":{"Access Token":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"For each API request, include this HTTP header:\n`Authorization` with the `Bearer {access_token}`. Bearer access token is the type of HTTP Authorization.  You have to include access token to the HTTP header and note that leading bearer is required.\nYou must include your access token in HTTP header in every request you make. The token is unique, issued for each client, and regularly changed(once a year). To obtain an access token, please [upgrade your plan](https://cryptoquant.com/pricing) to Professional or Premium plan. You'll be able to see your access token on the [API tab](https://cryptoquant.com/settings/api) of your profile page after the subscription."}},"parameters":{"miner":{"description":"A mining pool from the table that we support. [See here](#tag/BTC-Miner-Flows).","explode":false,"in":"query","name":"miner","required":true,"schema":{"type":"string"},"style":"form"},"window_dbh":{"description":"Currently we support `day`, `hour`, and `block`.","explode":false,"in":"query","name":"window","schema":{"type":"string","default":"day"},"style":"form"},"from":{"description":"This defines the starting time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the earliest time.","explode":false,"in":"query","name":"from","required":false,"schema":{"YYYYMMDDTHHMMSS":{"type":"string"}},"style":"form"},"to":{"description":"This defines the ending time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the latest time.","explode":false,"in":"query","name":"to","required":false,"schema":{"YYYYMMDDTHHMMSS":{"type":"string"}},"style":"form"},"limit":{"description":"The maximum number of entries to return before the latest data point (or before `to` if specified). This field ranges from 1 to 100,000.","explode":false,"in":"query","name":"limit","required":false,"schema":{"type":"integer","default":100,"minimum":1,"maximum":100000},"style":"form"},"format":{"description":"A format type about return message type. Supported formats are json, csv.","explode":false,"in":"query","name":"format","required":false,"schema":{"type":"string","default":"json"},"style":"form"}},"responses":{"responses_Outflow":{"description":"outflow_total, outflow_top10, outflow_mean","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schemas_OutflowResponse"}}}}},"schemas":{"schemas_OutflowResponse":{"type":"object","required":["status","result"],"properties":{"status":{"$ref":"#/components/schemas/Status"},"result":{"type":"object","required":["window","data"],"properties":{"window":{"$ref":"#/components/schemas/Window"},"data":{"type":"array","items":{"type":"object","required":["outflow_total","outflow_top10","outflow_mean"],"properties":{"blockheight":{"$ref":"#/components/schemas/Blockheight"},"date":{"$ref":"#/components/schemas/Date"},"datetime":{"$ref":"#/components/schemas/Datetime_H"},"outflow_total":{"type":"decimal","description":"The total amount of BTC transferred from the miner."},"outflow_top10":{"type":"decimal","description":"The total BTC amount of top 10 transactions (in terms of total BTC sent) flowing out of miner wallets for every day that the miner wallets we track have been live on the blockchain."},"outflow_mean":{"type":"decimal","description":"The mean of tokens per transaction sent from a miner."}}}}}}}},"Status":{"type":"object","description":"The status object is return with most of requests and indicates if the request was successful. If it is not successful, error information is included.","properties":{"code":{"type":"integer","format":"int32","description":"HTTP status code"},"message":{"type":"string","description":"Text description of the error or success."}},"required":["code","message"]},"Window":{"type":"string","description":"The size of window. It can be day or block, and it depends on the user request."},"Blockheight":{"type":"string","description":"The height of the block. This optional field only appears when window=block is used."},"Date":{"type":"string","description":"The date in YYYY-DD-MM. This optional field only appears when window=day is used."},"Datetime_H":{"type":"string","description":"The date and time formatted as YYYY-MM-DD HH:MM:SS (UTC time). This field only appears when window=block or window=hour is used."}}},"paths":{"/btc/miner-flows/outflow":{"get":{"tags":["BTC Miner Flows"],"summary":"Outflow","description":"This endpoint returns the outflow of BTC into mining pool wallets for as far back as we track. The average outflow is the average transaction value for transactions flowing out of mining pool wallets on a given day.","operationId":"BTCgetOutflowMF","parameters":[{"$ref":"#/components/parameters/miner"},{"$ref":"#/components/parameters/window_dbh"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/format"}],"responses":{"200":{"$ref":"#/components/responses/responses_Outflow"}}}}}}
```

## Transactions Count

> This endpoint returns the number of transactions flowing in/out of Bitcoin miners.

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Miner Flows","description":"This namespace contains endpoints to retrieve data related to Bitcoin miners(i.e. mining pools and its participants). We provide metrics related to miner reserves, inflows, outflows, hashrate, revenue, workers, etc.\nWe constantly keep updating new miner wallets, which means that there can be slight modification in values especially for recent data points.\nThe update is done in periodic and automatic way: Tuesday 00:00 UTC every week.\nSupported miners can be found in the `/btc/status/entity-list` endpoint.\nIn addition to that, we support the following aggregated miners:\n\n<br>\n\n### Supported Aggregated Miners\n\n| Name           |   Miner     |   Status    |\n|----------------|--------------|-------------|\n| All Miners     | `all_miner`    | Validated   |\n\n<br>\n\n> **Note:** This endpoint does not support Point-In-Time (PIT) accuracy due to periodic updates to wallet address clustering. Historical data may change as new miners wallets are discovered, added, and validated.\n\n<br>"}],"servers":[{"url":"https://api.cryptoquant.com/v1/","description":"Default server"}],"security":[{"Access Token":[]}],"components":{"securitySchemes":{"Access Token":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"For each API request, include this HTTP header:\n`Authorization` with the `Bearer {access_token}`. Bearer access token is the type of HTTP Authorization.  You have to include access token to the HTTP header and note that leading bearer is required.\nYou must include your access token in HTTP header in every request you make. The token is unique, issued for each client, and regularly changed(once a year). To obtain an access token, please [upgrade your plan](https://cryptoquant.com/pricing) to Professional or Premium plan. You'll be able to see your access token on the [API tab](https://cryptoquant.com/settings/api) of your profile page after the subscription."}},"parameters":{"miner":{"description":"A mining pool from the table that we support. [See here](#tag/BTC-Miner-Flows).","explode":false,"in":"query","name":"miner","required":true,"schema":{"type":"string"},"style":"form"},"window_dbh":{"description":"Currently we support `day`, `hour`, and `block`.","explode":false,"in":"query","name":"window","schema":{"type":"string","default":"day"},"style":"form"},"from":{"description":"This defines the starting time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the earliest time.","explode":false,"in":"query","name":"from","required":false,"schema":{"YYYYMMDDTHHMMSS":{"type":"string"}},"style":"form"},"to":{"description":"This defines the ending time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the latest time.","explode":false,"in":"query","name":"to","required":false,"schema":{"YYYYMMDDTHHMMSS":{"type":"string"}},"style":"form"},"limit":{"description":"The maximum number of entries to return before the latest data point (or before `to` if specified). This field ranges from 1 to 100,000.","explode":false,"in":"query","name":"limit","required":false,"schema":{"type":"integer","default":100,"minimum":1,"maximum":100000},"style":"form"},"format":{"description":"A format type about return message type. Supported formats are json, csv.","explode":false,"in":"query","name":"format","required":false,"schema":{"type":"string","default":"json"},"style":"form"}},"responses":{"TransactionsCountMF":{"description":"transactions_count_inflow, transactions_count_outflow","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionsCountMFResponse"}}}}},"schemas":{"TransactionsCountMFResponse":{"type":"object","required":["status","result"],"properties":{"status":{"$ref":"#/components/schemas/Status"},"result":{"type":"object","required":["window","data"],"properties":{"window":{"$ref":"#/components/schemas/Window"},"data":{"type":"array","items":{"type":"object","required":["transactions_count_inflow","transactions_count_outflow"],"properties":{"blockheight":{"$ref":"#/components/schemas/Blockheight"},"date":{"$ref":"#/components/schemas/Date"},"datetime":{"$ref":"#/components/schemas/Datetime_H"},"transactions_count_inflow":{"type":"decimal","description":"The number of transactions sent to the miner."},"transactions_count_outflow":{"type":"decimal","description":"The number of transactions sent from the miner."}}}}}}}},"Status":{"type":"object","description":"The status object is return with most of requests and indicates if the request was successful. If it is not successful, error information is included.","properties":{"code":{"type":"integer","format":"int32","description":"HTTP status code"},"message":{"type":"string","description":"Text description of the error or success."}},"required":["code","message"]},"Window":{"type":"string","description":"The size of window. It can be day or block, and it depends on the user request."},"Blockheight":{"type":"string","description":"The height of the block. This optional field only appears when window=block is used."},"Date":{"type":"string","description":"The date in YYYY-DD-MM. This optional field only appears when window=day is used."},"Datetime_H":{"type":"string","description":"The date and time formatted as YYYY-MM-DD HH:MM:SS (UTC time). This field only appears when window=block or window=hour is used."}}},"paths":{"/btc/miner-flows/transactions-count":{"get":{"tags":["BTC Miner Flows"],"summary":"Transactions Count","description":"This endpoint returns the number of transactions flowing in/out of Bitcoin miners.","operationId":"BTCgetTransactionsCountMF","parameters":[{"$ref":"#/components/parameters/miner"},{"$ref":"#/components/parameters/window_dbh"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/format"}],"responses":{"200":{"$ref":"#/components/responses/TransactionsCountMF"}}}}}}
```

## Addresses Count

> This endpoint returns the number of addresses involved in inflow/outflow transactions.

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Miner Flows","description":"This namespace contains endpoints to retrieve data related to Bitcoin miners(i.e. mining pools and its participants). We provide metrics related to miner reserves, inflows, outflows, hashrate, revenue, workers, etc.\nWe constantly keep updating new miner wallets, which means that there can be slight modification in values especially for recent data points.\nThe update is done in periodic and automatic way: Tuesday 00:00 UTC every week.\nSupported miners can be found in the `/btc/status/entity-list` endpoint.\nIn addition to that, we support the following aggregated miners:\n\n<br>\n\n### Supported Aggregated Miners\n\n| Name           |   Miner     |   Status    |\n|----------------|--------------|-------------|\n| All Miners     | `all_miner`    | Validated   |\n\n<br>\n\n> **Note:** This endpoint does not support Point-In-Time (PIT) accuracy due to periodic updates to wallet address clustering. Historical data may change as new miners wallets are discovered, added, and validated.\n\n<br>"}],"servers":[{"url":"https://api.cryptoquant.com/v1/","description":"Default server"}],"security":[{"Access Token":[]}],"components":{"securitySchemes":{"Access Token":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"For each API request, include this HTTP header:\n`Authorization` with the `Bearer {access_token}`. Bearer access token is the type of HTTP Authorization.  You have to include access token to the HTTP header and note that leading bearer is required.\nYou must include your access token in HTTP header in every request you make. The token is unique, issued for each client, and regularly changed(once a year). To obtain an access token, please [upgrade your plan](https://cryptoquant.com/pricing) to Professional or Premium plan. You'll be able to see your access token on the [API tab](https://cryptoquant.com/settings/api) of your profile page after the subscription."}},"parameters":{"miner":{"description":"A mining pool from the table that we support. [See here](#tag/BTC-Miner-Flows).","explode":false,"in":"query","name":"miner","required":true,"schema":{"type":"string"},"style":"form"},"window_dbh":{"description":"Currently we support `day`, `hour`, and `block`.","explode":false,"in":"query","name":"window","schema":{"type":"string","default":"day"},"style":"form"},"from":{"description":"This defines the starting time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the earliest time.","explode":false,"in":"query","name":"from","required":false,"schema":{"YYYYMMDDTHHMMSS":{"type":"string"}},"style":"form"},"to":{"description":"This defines the ending time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the latest time.","explode":false,"in":"query","name":"to","required":false,"schema":{"YYYYMMDDTHHMMSS":{"type":"string"}},"style":"form"},"limit":{"description":"The maximum number of entries to return before the latest data point (or before `to` if specified). This field ranges from 1 to 100,000.","explode":false,"in":"query","name":"limit","required":false,"schema":{"type":"integer","default":100,"minimum":1,"maximum":100000},"style":"form"},"format":{"description":"A format type about return message type. Supported formats are json, csv.","explode":false,"in":"query","name":"format","required":false,"schema":{"type":"string","default":"json"},"style":"form"}},"responses":{"AddressesCountMF":{"description":"The number of addresses evoking inflow/outflow transactions to miner wallets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressesCountMFResponse"}}}}},"schemas":{"AddressesCountMFResponse":{"type":"object","required":["status","result"],"properties":{"status":{"$ref":"#/components/schemas/Status"},"result":{"type":"object","required":["window","data"],"properties":{"window":{"$ref":"#/components/schemas/Window"},"data":{"type":"array","items":{"type":"object","required":["addresses_count_inflow","addresses_count_outflow"],"properties":{"blockheight":{"$ref":"#/components/schemas/Blockheight"},"date":{"$ref":"#/components/schemas/Date"},"datetime":{"$ref":"#/components/schemas/Datetime_H"},"addresses_count_inflow":{"type":"decimal","description":"The number of addresses evoking inflow transactions to mining pool wallets"},"addresses_count_outflow":{"type":"decimal","description":"The number of addresses evoking outflow transactions from mining pool wallets"}}}}}}}},"Status":{"type":"object","description":"The status object is return with most of requests and indicates if the request was successful. If it is not successful, error information is included.","properties":{"code":{"type":"integer","format":"int32","description":"HTTP status code"},"message":{"type":"string","description":"Text description of the error or success."}},"required":["code","message"]},"Window":{"type":"string","description":"The size of window. It can be day or block, and it depends on the user request."},"Blockheight":{"type":"string","description":"The height of the block. This optional field only appears when window=block is used."},"Date":{"type":"string","description":"The date in YYYY-DD-MM. This optional field only appears when window=day is used."},"Datetime_H":{"type":"string","description":"The date and time formatted as YYYY-MM-DD HH:MM:SS (UTC time). This field only appears when window=block or window=hour is used."}}},"paths":{"/btc/miner-flows/addresses-count":{"get":{"tags":["BTC Miner Flows"],"summary":"Addresses Count","description":"This endpoint returns the number of addresses involved in inflow/outflow transactions.","operationId":"BTCgetAddressesCountMF","parameters":[{"$ref":"#/components/parameters/miner"},{"$ref":"#/components/parameters/window_dbh"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/format"}],"responses":{"200":{"$ref":"#/components/responses/AddressesCountMF"}}}}}}
```

## In-House Flow

> This endpoint returns the in-house flow of BTC within wallets of the same miner for as far back as we track. The average in-house flow is the average transaction value for transactions flowing within wallets on a given day.

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Miner Flows","description":"This namespace contains endpoints to retrieve data related to Bitcoin miners(i.e. mining pools and its participants). We provide metrics related to miner reserves, inflows, outflows, hashrate, revenue, workers, etc.\nWe constantly keep updating new miner wallets, which means that there can be slight modification in values especially for recent data points.\nThe update is done in periodic and automatic way: Tuesday 00:00 UTC every week.\nSupported miners can be found in the `/btc/status/entity-list` endpoint.\nIn addition to that, we support the following aggregated miners:\n\n<br>\n\n### Supported Aggregated Miners\n\n| Name           |   Miner     |   Status    |\n|----------------|--------------|-------------|\n| All Miners     | `all_miner`    | Validated   |\n\n<br>\n\n> **Note:** This endpoint does not support Point-In-Time (PIT) accuracy due to periodic updates to wallet address clustering. Historical data may change as new miners wallets are discovered, added, and validated.\n\n<br>"}],"servers":[{"url":"https://api.cryptoquant.com/v1/","description":"Default server"}],"security":[{"Access Token":[]}],"components":{"securitySchemes":{"Access Token":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"For each API request, include this HTTP header:\n`Authorization` with the `Bearer {access_token}`. Bearer access token is the type of HTTP Authorization.  You have to include access token to the HTTP header and note that leading bearer is required.\nYou must include your access token in HTTP header in every request you make. The token is unique, issued for each client, and regularly changed(once a year). To obtain an access token, please [upgrade your plan](https://cryptoquant.com/pricing) to Professional or Premium plan. You'll be able to see your access token on the [API tab](https://cryptoquant.com/settings/api) of your profile page after the subscription."}},"parameters":{"miner":{"description":"A mining pool from the table that we support. [See here](#tag/BTC-Miner-Flows).","explode":false,"in":"query","name":"miner","required":true,"schema":{"type":"string"},"style":"form"},"window_dbh":{"description":"Currently we support `day`, `hour`, and `block`.","explode":false,"in":"query","name":"window","schema":{"type":"string","default":"day"},"style":"form"},"from":{"description":"This defines the starting time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the earliest time.","explode":false,"in":"query","name":"from","required":false,"schema":{"YYYYMMDDTHHMMSS":{"type":"string"}},"style":"form"},"to":{"description":"This defines the ending time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the latest time.","explode":false,"in":"query","name":"to","required":false,"schema":{"YYYYMMDDTHHMMSS":{"type":"string"}},"style":"form"},"limit":{"description":"The maximum number of entries to return before the latest data point (or before `to` if specified). This field ranges from 1 to 100,000.","explode":false,"in":"query","name":"limit","required":false,"schema":{"type":"integer","default":100,"minimum":1,"maximum":100000},"style":"form"},"format":{"description":"A format type about return message type. Supported formats are json, csv.","explode":false,"in":"query","name":"format","required":false,"schema":{"type":"string","default":"json"},"style":"form"}},"responses":{"responses_InHouseFlow":{"description":"flow_total, flow_mean, transactions_count_flow","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schemas_InHouseFlowResponse"}}}}},"schemas":{"schemas_InHouseFlowResponse":{"type":"object","required":["status","result"],"properties":{"status":{"$ref":"#/components/schemas/Status"},"result":{"type":"object","required":["window","data"],"properties":{"window":{"$ref":"#/components/schemas/Window_DBH"},"data":{"type":"array","items":{"type":"object","required":["flow_total","flow_mean","transactions_count_flow"],"properties":{"blockheight":{"$ref":"#/components/schemas/Blockheight"},"date":{"$ref":"#/components/schemas/Date"},"datetime":{"$ref":"#/components/schemas/Datetime_H"},"flow_total":{"type":"decimal","description":"The total amount of BTC circulated within an miner."},"flow_mean":{"type":"decimal","description":"The mean of tokens per transaction circulated within an miner."},"transactions_count_flow":{"type":"decimal","description":"The number of transactions circulated within an miner."}}}}}}}},"Status":{"type":"object","description":"The status object is return with most of requests and indicates if the request was successful. If it is not successful, error information is included.","properties":{"code":{"type":"integer","format":"int32","description":"HTTP status code"},"message":{"type":"string","description":"Text description of the error or success."}},"required":["code","message"]},"Window_DBH":{"type":"string","description":"The size of window. It can be day, hour, or block, and it depends on the user request."},"Blockheight":{"type":"string","description":"The height of the block. This optional field only appears when window=block is used."},"Date":{"type":"string","description":"The date in YYYY-DD-MM. This optional field only appears when window=day is used."},"Datetime_H":{"type":"string","description":"The date and time formatted as YYYY-MM-DD HH:MM:SS (UTC time). This field only appears when window=block or window=hour is used."}}},"paths":{"/btc/miner-flows/in-house-flow":{"get":{"tags":["BTC Miner Flows"],"summary":"In-House Flow","description":"This endpoint returns the in-house flow of BTC within wallets of the same miner for as far back as we track. The average in-house flow is the average transaction value for transactions flowing within wallets on a given day.","operationId":"BTCgetMinerInHouseFlow","parameters":[{"$ref":"#/components/parameters/miner"},{"$ref":"#/components/parameters/window_dbh"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/format"}],"responses":{"200":{"$ref":"#/components/responses/responses_InHouseFlow"}}}}}}
```
