# BTC Market Indicator

This namespace contains endpoints to retrieve MVRV(Market-Value-to-Realized-Value), Estimated Leverage Ratio, and etc. We provide certain indicators to avoid any risks, assume upside or downside potentials, and give insights on the value of bitcoin. We also provide USD and USDT spot price of BTC from global exchanges and BTC index price. CryptoQuant's BTC index price is VWAP(Volume Weighted Average Price) of aggregated price data from all exchanges we provide. For more detailed information, please refer to the description of each metric.

## Estimated Leverage Ratio

> By dividing the open interest of an exchange by their BTC reserve, you can estimate a relative average user leverage. Whenever the leverage value reaches a high, there is rapid volatility. Similar to Open Interest, but more accurate because it reflects the growth of the exchange itself. This is experimental indicator but it seems this reflects market sentiment. You can see how aggressive people are and how conservative they are in terms of investment. For 'In Progress' exchanges, estimated leverage ratio is not supported yet even though they provide open interest.\
> \_\_\[Go to Data Guide‣]\(<https://dataguide.cryptoquant.com/market-indicators/estimated-leverage-ratio)\\_\\_\\>
> \
> \<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 exchange wallets are discovered, added, and validated.\
> \
> \<br><br>

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Market Indicator","description":"This namespace contains endpoints to retrieve MVRV(Market-Value-to-Realized-Value), Estimated Leverage Ratio, and etc. We provide certain indicators to avoid any risks, assume upside or downside potentials, and give insights on the value of bitcoin.\nWe also provide USD and USDT spot price of BTC from global exchanges and BTC index price. CryptoQuant's BTC index price is VWAP(Volume Weighted Average Price) of aggregated price data from all exchanges we provide.\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":{"btc_exchange_oi":{"description":"A derivative exchange from the table that we support. [See here](#operation/BTCgetOpenInterest).","explode":false,"in":"query","name":"exchange","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":{"estimated-leverage-ratio":{"description":"The amount of open interest of exchange divided by their BTC reserve","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimatedLeverageRatioResponse"}}}}},"schemas":{"EstimatedLeverageRatioResponse":{"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":["estimated_leverage_ratio"],"properties":{"blockheight":{"$ref":"#/components/schemas/Blockheight"},"date":{"$ref":"#/components/schemas/Date"},"datetime":{"$ref":"#/components/schemas/Datetime"},"estimated_leverage_ratio":{"type":"decimal","description":"The amount of open interest in the given period and exchange divided by the BTC reserve of given exchange"}}}}}}}},"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":{"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/market-indicator/estimated-leverage-ratio":{"get":{"tags":["BTC Market Indicator"],"summary":"Estimated Leverage Ratio","description":"By dividing the open interest of an exchange by their BTC reserve, you can estimate a relative average user leverage. Whenever the leverage value reaches a high, there is rapid volatility. Similar to Open Interest, but more accurate because it reflects the growth of the exchange itself. This is experimental indicator but it seems this reflects market sentiment. You can see how aggressive people are and how conservative they are in terms of investment. For 'In Progress' exchanges, estimated leverage ratio is not supported yet even though they provide open interest.\n__[Go to Data Guide‣](https://dataguide.cryptoquant.com/market-indicators/estimated-leverage-ratio)__\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 exchange wallets are discovered, added, and validated.\n\n<br>\n","operationId":"getEstimatedLeverageRatio","parameters":[{"$ref":"#/components/parameters/btc_exchange_oi"},{"$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/estimated-leverage-ratio"}}}}}}
```

## Stablecoin Supply Ratio

> SSR(Stablecoin Supply Ratio) is a ratio of stablecoin supply in the whole cryptocurrency market where stablecoin is used as fiat substitute for trading. This means that the supply of stablecoin can be used to assess the potential buying pressure for bitcoin. The historical starting point is 2017-11-28 00:00:00.  \
> \_\_\[Go to Data Guide‣]\(<https://dataguide.cryptoquant.com/market-indicators/stablecoin-supply-ratio)\\_\\>\_<br>

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Market Indicator","description":"This namespace contains endpoints to retrieve MVRV(Market-Value-to-Realized-Value), Estimated Leverage Ratio, and etc. We provide certain indicators to avoid any risks, assume upside or downside potentials, and give insights on the value of bitcoin.\nWe also provide USD and USDT spot price of BTC from global exchanges and BTC index price. CryptoQuant's BTC index price is VWAP(Volume Weighted Average Price) of aggregated price data from all exchanges we provide.\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":{"window_d":{"description":"Currently, we only support `day`.","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":{"stablecoin-supply-ratio":{"description":"stablecoin_supply_ratio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SSRResponse"}}}}},"schemas":{"SSRResponse":{"type":"object","required":["status","result"],"properties":{"status":{"$ref":"#/components/schemas/Status"},"result":{"type":"object","required":["window","data"],"properties":{"window":{"$ref":"#/components/schemas/Window_D"},"data":{"type":"array","items":{"type":"object","required":["stablecoin_supply_ratio"],"properties":{"date":{"$ref":"#/components/schemas/Date"},"stablecoin_supply_ratio":{"type":"decimal","description":"SSR is a ratio of stablecoin supply in the whole cryptocurrency market."}}}}}}}},"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_D":{"type":"string","description":"The size of window. This metric supports only day resolution."},"Date":{"type":"string","description":"The date in YYYY-DD-MM. This optional field only appears when window=day is used."}}},"paths":{"/btc/market-indicator/stablecoin-supply-ratio":{"get":{"tags":["BTC Market Indicator"],"summary":"Stablecoin Supply Ratio","description":"SSR(Stablecoin Supply Ratio) is a ratio of stablecoin supply in the whole cryptocurrency market where stablecoin is used as fiat substitute for trading. This means that the supply of stablecoin can be used to assess the potential buying pressure for bitcoin. The historical starting point is 2017-11-28 00:00:00.  \n__[Go to Data Guide‣](https://dataguide.cryptoquant.com/market-indicators/stablecoin-supply-ratio)__\n","operationId":"getStablecoinSupplyRatio","parameters":[{"$ref":"#/components/parameters/window_d"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/format"}],"responses":{"200":{"$ref":"#/components/responses/stablecoin-supply-ratio"}}}}}}
```

## MVRV

> MVRV(Market-Value-to-Realized-Value) is a ratio of \`market\_cap\` divided by \`realized\_cap\`. It can be interpreted as the relationship between short-term and long-term investors (i.e. speculators vs hodlers). When this value is too high, BTC price may be overvalued, and if it is too low, there is a possibility that the price is undervalued.  \
> \_\_\[Go to Data Guide‣]\(<https://dataguide.cryptoquant.com/market-indicators/mvrv-ratio)\\_\\>\_<br>

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Market Indicator","description":"This namespace contains endpoints to retrieve MVRV(Market-Value-to-Realized-Value), Estimated Leverage Ratio, and etc. We provide certain indicators to avoid any risks, assume upside or downside potentials, and give insights on the value of bitcoin.\nWe also provide USD and USDT spot price of BTC from global exchanges and BTC index price. CryptoQuant's BTC index price is VWAP(Volume Weighted Average Price) of aggregated price data from all exchanges we provide.\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":{"window":{"description":"Currently we support `day` 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":{"mvrv":{"description":"mvrv","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MVRVResponse"}}}}},"schemas":{"MVRVResponse":{"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":["mvrv"],"properties":{"blockheight":{"$ref":"#/components/schemas/Blockheight"},"date":{"$ref":"#/components/schemas/Date"},"datetime":{"$ref":"#/components/schemas/Datetime"},"mvrv":{"type":"decimal","description":"market_cap/realized_cap"}}}}}}}},"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":{"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/market-indicator/mvrv":{"get":{"tags":["BTC Market Indicator"],"summary":"MVRV","description":"MVRV(Market-Value-to-Realized-Value) is a ratio of `market_cap` divided by `realized_cap`. It can be interpreted as the relationship between short-term and long-term investors (i.e. speculators vs hodlers). When this value is too high, BTC price may be overvalued, and if it is too low, there is a possibility that the price is undervalued.  \n__[Go to Data Guide‣](https://dataguide.cryptoquant.com/market-indicators/mvrv-ratio)__\n","operationId":"getMarketIndicatorMVRV","parameters":[{"$ref":"#/components/parameters/window"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/format"}],"responses":{"200":{"$ref":"#/components/responses/mvrv"}}}}}}
```

## Spent Output Profit Ratio

> \`sopr\` is abbreviation of Spent Output Profit Ratio.\
> Spent Output Profit Ratio evaluates the profit ratio of the whole market participants by comparing the value of outputs at spent time to created time.\
> \`sopr\` is a ratio that is calculated as the USD value of spent outputs at the spent time divided by the USD value of spent outputs at the created time.\
> So you can see the value when UTxO destroyed. In a simple way, you can estimate the distribution of spent transaction output are in profit or not.<br>

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Market Indicator","description":"This namespace contains endpoints to retrieve MVRV(Market-Value-to-Realized-Value), Estimated Leverage Ratio, and etc. We provide certain indicators to avoid any risks, assume upside or downside potentials, and give insights on the value of bitcoin.\nWe also provide USD and USDT spot price of BTC from global exchanges and BTC index price. CryptoQuant's BTC index price is VWAP(Volume Weighted Average Price) of aggregated price data from all exchanges we provide.\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":{"window":{"description":"Currently we support `day` 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":{"sopr":{"description":"spent_output_profit_ratio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SOPRResponse"}}}}},"schemas":{"SOPRResponse":{"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":["sopr","a_sopr","sth_sopr","lth_sopr"],"properties":{"blockheight":{"$ref":"#/components/schemas/Blockheight"},"date":{"$ref":"#/components/schemas/Date"},"datetime":{"$ref":"#/components/schemas/Datetime"},"sopr":{"type":"decimal","description":"Spent Output Profit Ratio is a ratio of spent outputs in profit at the time of the window."},"a_sopr":{"type":"decimal","description":"Adjusted spent output only includes alive more than 1 hour."},"sth_sopr":{"type":"decimal","description":"Short term holder spent output only includes alive more than 1 hour and less than 155 days."},"lth_sopr":{"type":"decimal","description":"Long term holder spent output only includes alive more than 155 days."}}}}}}}},"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":{"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/market-indicator/sopr":{"get":{"tags":["BTC Market Indicator"],"summary":"Spent Output Profit Ratio","description":"`sopr` is abbreviation of Spent Output Profit Ratio.\nSpent Output Profit Ratio evaluates the profit ratio of the whole market participants by comparing the value of outputs at spent time to created time.\n`sopr` is a ratio that is calculated as the USD value of spent outputs at the spent time divided by the USD value of spent outputs at the created time.\nSo you can see the value when UTxO destroyed. In a simple way, you can estimate the distribution of spent transaction output are in profit or not.\n","operationId":"getSOPR","parameters":[{"$ref":"#/components/parameters/window"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/format"}],"responses":{"200":{"$ref":"#/components/responses/sopr"}}}}}}
```

## SOPR Ratio

> SOPR Ratio is calculated as long term holders' SOPR divided by short term holders' SOPR. Higher value of the ratio means higher spent profit of LTH over STH, which is usually useful for spotting market tops.<br>

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Market Indicator","description":"This namespace contains endpoints to retrieve MVRV(Market-Value-to-Realized-Value), Estimated Leverage Ratio, and etc. We provide certain indicators to avoid any risks, assume upside or downside potentials, and give insights on the value of bitcoin.\nWe also provide USD and USDT spot price of BTC from global exchanges and BTC index price. CryptoQuant's BTC index price is VWAP(Volume Weighted Average Price) of aggregated price data from all exchanges we provide.\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":{"window":{"description":"Currently we support `day` 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":{"sopr-ratio":{"description":"Long term holders' SOPR divided by short term holders' SOPR.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SOPRRatioResponse"}}}}},"schemas":{"SOPRRatioResponse":{"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":["sopr_ratio"],"properties":{"blockheight":{"$ref":"#/components/schemas/Blockheight"},"date":{"$ref":"#/components/schemas/Date"},"datetime":{"$ref":"#/components/schemas/Datetime"},"sopr_ratio":{"type":"decimal","description":"Long term holders' SOPR divided by short term holders' SOPR."}}}}}}}},"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":{"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/market-indicator/sopr-ratio":{"get":{"tags":["BTC Market Indicator"],"summary":"SOPR Ratio","description":"SOPR Ratio is calculated as long term holders' SOPR divided by short term holders' SOPR. Higher value of the ratio means higher spent profit of LTH over STH, which is usually useful for spotting market tops.\n","operationId":"getSOPRRatio","parameters":[{"$ref":"#/components/parameters/window"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/format"}],"responses":{"200":{"$ref":"#/components/responses/sopr-ratio"}}}}}}
```

## Realized Price

> Realized Price is calculated as Realized Cap divided by the total coin supply. It measures the  average price weighted by the supply of what the entire market participants paid for their coins. It sometimes can be interpreted as the on-chain support or resistance price.<br>

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Market Indicator","description":"This namespace contains endpoints to retrieve MVRV(Market-Value-to-Realized-Value), Estimated Leverage Ratio, and etc. We provide certain indicators to avoid any risks, assume upside or downside potentials, and give insights on the value of bitcoin.\nWe also provide USD and USDT spot price of BTC from global exchanges and BTC index price. CryptoQuant's BTC index price is VWAP(Volume Weighted Average Price) of aggregated price data from all exchanges we provide.\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":{"window":{"description":"Currently we support `day` 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":{"realized-price":{"description":"Realized Cap divided by total supply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealizedPriceResponse"}}}}},"schemas":{"RealizedPriceResponse":{"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":["realized_price"],"properties":{"blockheight":{"$ref":"#/components/schemas/Blockheight"},"date":{"$ref":"#/components/schemas/Date"},"datetime":{"$ref":"#/components/schemas/Datetime"},"realized_price":{"type":"decimal","description":"Realized Cap divided by total supply."}}}}}}}},"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":{"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/market-indicator/realized-price":{"get":{"tags":["BTC Market Indicator"],"summary":"Realized Price","description":"Realized Price is calculated as Realized Cap divided by the total coin supply. It measures the  average price weighted by the supply of what the entire market participants paid for their coins. It sometimes can be interpreted as the on-chain support or resistance price.\n","operationId":"getRealizedPrice","parameters":[{"$ref":"#/components/parameters/window"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/format"}],"responses":{"200":{"$ref":"#/components/responses/realized-price"}}}}}}
```

## UTxO Realized Price Age Distribution

> UTxO Realized Price Age Distribution is a set of realized prices along with age bands. The metrics help us to overview each cohort’s holding behavior by overlaying a set of different realized prices.<br>

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"BTC Market Indicator","description":"This namespace contains endpoints to retrieve MVRV(Market-Value-to-Realized-Value), Estimated Leverage Ratio, and etc. We provide certain indicators to avoid any risks, assume upside or downside potentials, and give insights on the value of bitcoin.\nWe also provide USD and USDT spot price of BTC from global exchanges and BTC index price. CryptoQuant's BTC index price is VWAP(Volume Weighted Average Price) of aggregated price data from all exchanges we provide.\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":{"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":{"utxo-realized-price-age-distribution":{"description":"utxo-realized-price-age-distribution","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UTxORealizedPriceAgeDistributionResponse"}}}}},"schemas":{"UTxORealizedPriceAgeDistributionResponse":{"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":["range_0d_1d","range_1d_1w","range_1w_1m","range_1m_3m","range_3m_6m","range_6m_12m","range_12m_18m","range_18m_2y","range_2y_3y","range_3y_5y","range_5y_7y","range_7y_10y","range_10y_inf"],"properties":{"blockheight":{"$ref":"#/components/schemas/Blockheight"},"date":{"$ref":"#/components/schemas/Date"},"datetime":{"$ref":"#/components/schemas/Datetime_H"},"range_0d_1d":{"type":"decimal","description":"Realized price of UTxOs of ages between 0 day to 1 day."},"range_1d_1w":{"type":"decimal","description":"Realized price of UTxOs of ages between 1 day to 1 week."},"range_1w_1m":{"type":"decimal","description":"Realized price of UTxOs of ages between 1 week to 1 month."},"range_1m_3m":{"type":"decimal","description":"Realized price of UTxOs of ages between 1 month to 3 months."},"range_3m_6m":{"type":"decimal","description":"Realized price of UTxOs of ages between 3 months to 6 months."},"range_6m_12m":{"type":"decimal","description":"Realized price of UTxOs of ages between 6 months to 12 months."},"range_12m_18m":{"type":"decimal","description":"Realized price of UTxOs of ages between 12 months to 18 months."},"range_18m_2y":{"type":"decimal","description":"Realized price of UTxOs of ages between 18 months to 2 years."},"range_2y_3y":{"type":"decimal","description":"Realized price of UTxOs of ages between 2 years to 3 years."},"range_3y_5y":{"type":"decimal","description":"Realized price of UTxOs of ages between 3 years to 5 years."},"range_5y_7y":{"type":"decimal","description":"Realized price of UTxOs of ages between 5 years to 7 years."},"range_7y_10y":{"type":"decimal","description":"Realized price of UTxOs of ages between 7 years to 10 years."},"range_10y_inf":{"type":"decimal","description":"Realized price of UTxOs of ages over 10 years."}}}}}}}},"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/market-indicator/utxo-realized-price-age-distribution":{"get":{"tags":["BTC Market Indicator"],"summary":"UTxO Realized Price Age Distribution","description":"UTxO Realized Price Age Distribution is a set of realized prices along with age bands. The metrics help us to overview each cohort’s holding behavior by overlaying a set of different realized prices.\n","operationId":"getUTxORealizedPriceAgeDistribution","parameters":[{"$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/utxo-realized-price-age-distribution"}}}}}}
```
