# BTC Mempool Statistics

This namespace contains endpoints to retrieve statistics on Memory Pool in Bitcoin network. We provide certain metrics such as transaction count, total transaction size, total transaction fee on memory pool, based on fee range, including aggregated metrics. For more detailed information, please refer to the description of each metric.

## BTC Memory pool Statistics by relative fee range

> Mempool Statistics contains three metrics related to transactions waiting to be confirmed. You can see metrics for the number of transactions, the total amount of fees, and the aggregate size in bytes of transactions. Each metric was calculated based on fee level.\
> \
> \<br>\
> \
> \### Supported Metrics\
> \| Metric Type  |   Description   |\
> \|--------------|--------------------------------------------------------|\
> \| \`tx\_count\*\`  | The total number of unconfirmed transactions (Number)  |\
> \| \`total\_size\` | The aggregated size in bytes of transactions  (Megabyte)|\
> \| \`total\_fee\`  | The total fee of unconfirmed transactions    (BTC)     |\
> \
> \> (\*) Default\
> \<br>\
> \
> \### Supported Windows\
> \
> \| Supported Windows |\
> \|-------------------|\
> \| \`hour\`, \`day\*\`    |\
> \
> \> (\*) Default

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Mempool Statistics","description":"This namespace contains endpoints to retrieve statistics on Memory Pool in Bitcoin network. We provide certain metrics such as transaction count, total transaction size, total transaction fee on memory pool, based on fee range, including aggregated metrics.\nFor more detailed information, please refer to the description of each metric."}],"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":{"metric_type":{"description":"A metric type derived from statistics. Supported formats are json, csv.","explode":false,"in":"query","name":"metric_type","required":false,"schema":{"type":"string","default":"tx_count"},"style":"form"},"window_dh":{"description":"Currently, we support `day` and `hour`.","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":{"stats-by-relative-fee":{"description":"BTC Mempool Stats by relative fee","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BTCMempoolStatsByRelativeFeeResponse"}}}}},"schemas":{"BTCMempoolStatsByRelativeFeeResponse":{"type":"object","required":["status","result"],"properties":{"status":{"$ref":"#/components/schemas/Status"},"result":{"type":"object","required":["window","data"],"properties":{"window":{"$ref":"#/components/schemas/Window_DH"},"data":{"type":"array","items":{"type":"object","required":["date","metric_type","metric_unit","relative_fee_range_a_b"],"properties":{"date":{"$ref":"#/components/schemas/Datetime"},"metric_type":{"type":"string","description":"metric type."},"metric_unit":{"type":"string","description":"an unit of the retrieved metric."},"relative_fee_range_0_1":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 0 ~ 1 (sat.vByte)."},"relative_fee_range_1_2":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 1 ~ 2 (sat.vByte)."},"relative_fee_range_2_3":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 2 ~ 3 (sat.vByte)."},"relative_fee_range_3_4":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 3 ~ 4 (sat.vByte)."},"relative_fee_range_4_5":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 4 ~ 5 (sat.vByte)."},"relative_fee_range_5_6":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 5 ~ 6 (sat.vByte)."},"relative_fee_range_6_7":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 6 ~ 7 (sat.vByte)."},"relative_fee_range_7_8":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 7 ~ 8 (sat.vByte)."},"relative_fee_range_8_10":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 8 ~ 10 (sat.vByte)."},"relative_fee_range_10_12":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 10 ~ 12 (sat.vByte)."},"relative_fee_range_12_14":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 12 ~ 14 (sat.vByte)."},"relative_fee_range_14_17":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 14 ~ 17 (sat.vByte)."},"relative_fee_range_17_20":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 17 ~ 20 (sat.vByte)."},"relative_fee_range_20_25":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 20 ~ 25 (sat.vByte)."},"relative_fee_range_25_30":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 25 ~ 30 (sat.vByte)."},"relative_fee_range_30_40":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 30 ~ 40 (sat.vByte)."},"relative_fee_range_40_50":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 40 ~ 50 (sat.vByte)."},"relative_fee_range_50_60":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 50 ~ 60 (sat.vByte)."},"relative_fee_range_60_70":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 60 ~ 70 (sat.vByte)."},"relative_fee_range_70_80":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 70 ~ 80 (sat.vByte)."},"relative_fee_range_80_100":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 80 ~ 100 (sat.vByte)."},"relative_fee_range_100_120":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 100 ~ 120 (sat.vByte)."},"relative_fee_range_120_140":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 120 ~ 140 (sat.vByte)."},"relative_fee_range_140_170":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 140 ~ 170 (sat.vByte)."},"relative_fee_range_170_200":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 170 ~ 200 (sat.vByte)."},"relative_fee_range_200_250":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 200 ~ 250 (sat.vByte)."},"relative_fee_range_250_300":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 250 ~ 300 (sat.vByte)."},"relative_fee_range_300_400":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 300 ~ 400 (sat.vByte)."},"relative_fee_range_400_500":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 400 ~ 500 (sat.vByte)."},"relative_fee_range_500_600":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 500 ~ 600 (sat.vByte)."},"relative_fee_range_600_700":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 600 ~ 700 (sat.vByte)."},"relative_fee_range_700_800":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 700 ~ 800 (sat.vByte)."},"relative_fee_range_800_1000":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 800 ~ 1000 (sat.vByte)."},"relative_fee_range_1000_1200":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 1000 ~ 1200 (sat.vByte)."},"relative_fee_range_1200_1400":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 1200 ~ 1400 (sat.vByte)."},"relative_fee_range_1400_1700":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 1400 ~ 1700 (sat.vByte)."},"relative_fee_range_1700_2000":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 1700 ~ 2000 (sat.vByte)."},"relative_fee_range_2000_2500":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 2000 ~ 2500 (sat.vByte)."},"relative_fee_range_2500_3000":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 2500 ~ 3000 (sat.vByte)."},"relative_fee_range_3000_4000":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 3000 ~ 4000 (sat.vByte)."},"relative_fee_range_4000_5000":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 4000 ~ 5000 (sat.vByte)."},"relative_fee_range_5000_6000":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 5000 ~ 6000 (sat.vByte)."},"relative_fee_range_6000_7000":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 6000 ~ 7000 (sat.vByte)."},"relative_fee_range_7000_8000":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 7000 ~ 8000 (sat.vByte)."},"relative_fee_range_8000_10000":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 8000 ~ 10000 (sat.vByte)."},"relative_fee_range_10000_inf":{"type":"decimal","description":"calculated metrics from unconfirmed transactions which are contained in Fee level 10000 ~ inf (sat.vByte)."}}}}}}}},"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_DH":{"type":"string","description":"The size of window. It can be day or hour, and it depends on the user request."},"Datetime":{"type":"string","description":"The date and time formatted as YYYY-MM-DD HH:MM:SS (UTC time). This field only appears when window=block is used."}}},"paths":{"/btc/mempool/stats-by-relative-fee":{"get":{"tags":["BTC Mempool Statistics"],"summary":"BTC Memory pool Statistics by relative fee range","description":"Mempool Statistics contains three metrics related to transactions waiting to be confirmed. You can see metrics for the number of transactions, the total amount of fees, and the aggregate size in bytes of transactions. Each metric was calculated based on fee level.\n\n<br>\n\n### Supported Metrics\n| Metric Type  |   Description   |\n|--------------|--------------------------------------------------------|\n| `tx_count*`  | The total number of unconfirmed transactions (Number)  |\n| `total_size` | The aggregated size in bytes of transactions  (Megabyte)|\n| `total_fee`  | The total fee of unconfirmed transactions    (BTC)     |\n\n> (*) Default\n<br>\n\n### Supported Windows\n\n| Supported Windows |\n|-------------------|\n| `hour`, `day*`    |\n\n> (*) Default","operationId":"getBTCMempoolStatsByRelativeFee","parameters":[{"$ref":"#/components/parameters/metric_type"},{"$ref":"#/components/parameters/window_dh"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/format"}],"responses":{"200":{"$ref":"#/components/responses/stats-by-relative-fee"}}}}}}
```

## BTC Memory pool Statistics (Sum)

> Mempool Statistics contains three metrics related to transactions waiting to be confirmed. You can see metrics for the number of transactions, the total amount of fees, and the aggregate size in bytes of transactions.\
> \
> \<br>\
> \
> \### Supported Metrics\
> \| Metric Type  |   Description   |\
> \|--------------|--------------------------------------------------------------------------------------|\
> \| \`tx\_count\*\`  | The average number of unconfirmed transactions in selected time range (Number)       |\
> \| \`total\_size\` | The average aggregate size in bytes of transactions in selected time range (Megabyte)|\
> \| \`total\_fee\`  | The average total fee of unconfirmed transactions in selected time range (BTC)       |\
> \
> \> (\*) Default\
> \<br>\
> \
> \### Supported Windows\
> \
> \| Supported Windows |\
> \|-------------------|\
> \| \`hour\`, \`day\*\`    |\
> \
> \> (\*) Default

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Mempool Statistics","description":"This namespace contains endpoints to retrieve statistics on Memory Pool in Bitcoin network. We provide certain metrics such as transaction count, total transaction size, total transaction fee on memory pool, based on fee range, including aggregated metrics.\nFor more detailed information, please refer to the description of each metric."}],"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":{"metric_type":{"description":"A metric type derived from statistics. Supported formats are json, csv.","explode":false,"in":"query","name":"metric_type","required":false,"schema":{"type":"string","default":"tx_count"},"style":"form"},"window_dh":{"description":"Currently, we support `day` and `hour`.","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":{"stats-in-total":{"description":"BTC Mempool Stats (Sum)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BTCMempoolStatsInTotalResponse"}}}}},"schemas":{"BTCMempoolStatsInTotalResponse":{"type":"object","required":["status","result"],"properties":{"status":{"$ref":"#/components/schemas/Status"},"result":{"type":"object","required":["window","data"],"properties":{"window":{"$ref":"#/components/schemas/Window_DH"},"data":{"type":"array","items":{"type":"object","required":["date","metric_type","metric_unit","result"],"properties":{"date":{"$ref":"#/components/schemas/Datetime"},"metric_type":{"type":"string","description":"metric type."},"metric_unit":{"type":"string","description":"an unit of the retrieved metric."},"result":{"type":"decimal","description":"calculated metrics from unconfirmed transactions in Memory 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_DH":{"type":"string","description":"The size of window. It can be day or hour, and it depends on the user request."},"Datetime":{"type":"string","description":"The date and time formatted as YYYY-MM-DD HH:MM:SS (UTC time). This field only appears when window=block is used."}}},"paths":{"/btc/mempool/stats-in-total":{"get":{"tags":["BTC Mempool Statistics"],"summary":"BTC Memory pool Statistics (Sum)","description":"Mempool Statistics contains three metrics related to transactions waiting to be confirmed. You can see metrics for the number of transactions, the total amount of fees, and the aggregate size in bytes of transactions.\n\n<br>\n\n### Supported Metrics\n| Metric Type  |   Description   |\n|--------------|--------------------------------------------------------------------------------------|\n| `tx_count*`  | The average number of unconfirmed transactions in selected time range (Number)       |\n| `total_size` | The average aggregate size in bytes of transactions in selected time range (Megabyte)|\n| `total_fee`  | The average total fee of unconfirmed transactions in selected time range (BTC)       |\n\n> (*) Default\n<br>\n\n### Supported Windows\n\n| Supported Windows |\n|-------------------|\n| `hour`, `day*`    |\n\n> (*) Default","operationId":"getBTCMempoolStatsInTotal","parameters":[{"$ref":"#/components/parameters/metric_type"},{"$ref":"#/components/parameters/window_dh"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/format"}],"responses":{"200":{"$ref":"#/components/responses/stats-in-total"}}}}}}
```
