# TRX Market Data

This namespace contains endpoints to retrieve metrics related to TRX Market Data.

## Price OHLCV

> This endpoint returns metrics related to TRX's Price, Price OHLCV data consists of five metrics.\<br>\
> \| Metric | Description |\
> \|--------|-------------|\
> \| \`open\` | The opening price at the beginning of the window. |\
> \| \`close\` | The USD closing price at the end of the window. |\
> \| \`high\` | The highest USD price in a given window. |\
> \| \`low\` | The lowest USD price in a given window. |\
> \| \`volume\` | The total volume traded in a given window. |\
> \
> \> (\*) Default exchange \<br />\
> \### Supported Exchanges By Market\
> \| Name | Market  |    Supported Exchanges     |\
> \|--------|---------|----------------------------|\
> \| Spot   | \`spot\`  | All Exchange\* |\
> \
> \### Supported Pairs By Exchange\
> \| Name           | Exchange       | Symbol     |\
> \|----------------|----------------|------------|\
> \|  All Exchanges | \`all\_exchange\` | \`trx\_usd\`\* |\
> \
> \### Supported Windows By Market\
> \|   Market  |   Supported Windows   |\
> \|-----------|-----------------------|\
> \| Spot      | \`day\*\`                |

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"TRX Market Data","description":"This namespace contains endpoints to retrieve metrics related to TRX Market Data."}],"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":{"trx_market":{"description":"A market type from the table that we support. [See here](#operation/getTRXPriceOHLCV)","explode":false,"in":"query","name":"market","required":false,"schema":{"type":"string","default":"spot"},"style":"form"},"trx_exchange_ohlcv":{"description":"A exchange from the table that we support. [See here](#operation/getTRXPriceOHLCV).","explode":false,"in":"query","name":"exchange","required":false,"schema":{"type":"string","default":"all_exchange"},"style":"form"},"trx_symbol_ohlcv":{"description":"A TRX pair symbol from the table that we support. [See here](#operation/getTRXPriceOHLCV)","explode":false,"in":"query","name":"symbol","required":false,"schema":{"type":"string"},"style":"form"},"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":{"responses_PriceOHLCV-2":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceOHLCV"}}}}},"schemas":{"PriceOHLCV":{"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":["open","high","low","close","volume"],"properties":{"date":{"$ref":"#/components/schemas/Date"},"open":{"type":"decimal","description":"opening price at the beginning of the window."},"high":{"type":"decimal","description":"The highest price in a given window."},"low":{"type":"decimal","description":"The lowest price in a given window."},"close":{"type":"decimal","description":"The opening price at the end of the window."},"volume":{"type":"decimal","description":"The total traded amount in a given window."}}}}}}}},"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":{"/trx/market-data/price-ohlcv":{"get":{"tags":["TRX Market Data"],"summary":"Price OHLCV","description":"This endpoint returns metrics related to TRX's Price, Price OHLCV data consists of five metrics.<br>\n| Metric | Description |\n|--------|-------------|\n| `open` | The opening price at the beginning of the window. |\n| `close` | The USD closing price at the end of the window. |\n| `high` | The highest USD price in a given window. |\n| `low` | The lowest USD price in a given window. |\n| `volume` | The total volume traded in a given window. |\n\n> (*) Default exchange <br />\n### Supported Exchanges By Market\n| Name | Market  |    Supported Exchanges     |\n|--------|---------|----------------------------|\n| Spot   | `spot`  | All Exchange* |\n\n### Supported Pairs By Exchange\n| Name           | Exchange       | Symbol     |\n|----------------|----------------|------------|\n|  All Exchanges | `all_exchange` | `trx_usd`* |\n\n### Supported Windows By Market\n|   Market  |   Supported Windows   |\n|-----------|-----------------------|\n| Spot      | `day*`                |","operationId":"getPriceOHLCV","parameters":[{"$ref":"#/components/parameters/trx_market"},{"$ref":"#/components/parameters/trx_exchange_ohlcv"},{"$ref":"#/components/parameters/trx_symbol_ohlcv"},{"$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/responses_PriceOHLCV-2"}}}}}}
```

## Capitalization

> This endpoint returns metrics related to market capitalization.\<br />\
> We provide \`market\_cap\`, which is total market capitalization of TRX, calculated by multiplying the total supply with its USD price.\<br />\
> \_\_\[Go to Data Guide‣]\(<https://userguide.cryptoquant.com/cryptoquant-metrics/market/capitalization-models)\\_\\>\_

```json
{"openapi":"3.0.0","info":{"title":"CryptoQuant Data API","version":"1.3.0"},"tags":[{"name":"TRX Market Data","description":"This namespace contains endpoints to retrieve metrics related to TRX Market Data."}],"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":{"responses_Capitalization-3":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Capitalization"}}}}},"schemas":{"Capitalization":{"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":["market_cap"],"properties":{"date":{"$ref":"#/components/schemas/Date"},"market_cap":{"type":"decimal","description":"Market capitalization of TRX, calculated by total_supply * price_usd_close."}}}}}}}},"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":{"/trx/market-data/capitalization":{"get":{"tags":["TRX Market Data"],"summary":"Capitalization","description":"This endpoint returns metrics related to market capitalization.<br />\nWe provide `market_cap`, which is total market capitalization of TRX, calculated by multiplying the total supply with its USD price.<br />\n__[Go to Data Guide‣](https://userguide.cryptoquant.com/cryptoquant-metrics/market/capitalization-models)__","operationId":"getCapitalization","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/responses_Capitalization-3"}}}}}}
```
