openapi: 3.0.2
info:
title: Coin Metrics API v4 Blockchain Explorer Job Timeseries API
description: '[Coin Metrics Homepage](https://coinmetrics.io/)<br/> [API Backward Compatibility Policy](https://docs.coinmetrics.io/access-our-data/api#backward-compatibility)<br/> [Python API Client](https://coinmetrics.github.io/api-client-python/site/index.html)<br/><br/>
HTTP API root endpoint URL is `https://api.coinmetrics.io/v4`. Coin Metrics' paid product.<br/> WebSocket API root endpoint is `wss://api.coinmetrics.io/v4`. Coin Metrics' paid product.<br/><br/> The Community HTTP API root endpoint URL is `https://community-api.coinmetrics.io/v4`. API key is not required when accessing community endpoints. Available to the community under the [Creative Commons](https://creativecommons.org/licenses/by-nc/4.0/) license.
# Authentication
<!-- ReDoc-Inject: <security-definitions> -->
# Response headers
Note that Coin Metrics API responses have a `CF-RAY` HTTP header e.g. `88a6ec1d2f930774-IAD` which can be used for diagnostic purposes. When raising Support requests, please ensure to provide the value of this header. '
termsOfService: https://coinmetrics.io/api/terms
contact:
name: Coin Metrics Support
url: https://coinmetrics.io/support/
email: support@coinmetrics.io
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: 4.0.0
servers:
- url: https://api.coinmetrics.io/v4
- url: wss://api.coinmetrics.io/v4
- url: https://community-api.coinmetrics.io/v4
tags:
- name: Timeseries
description: Endpoints for fetching metrics, market data, indexes and other time series data.
paths:
/timeseries/asset-metrics:
servers:
- url: https://api.coinmetrics.io/v4
- url: https://community-api.coinmetrics.io/v4
get:
summary: Asset metrics
description: "Returns requested metrics for specified assets.<br/><br/> Results for block by block metrics (`1b` frequency) are ordered by tuple `(asset, height, block_hash)`, all other metrics are ordered by tuple `(asset, time)`. You can change the sorting using `sort` query parameter.<br/><br/> Supported output formats are `json` (default), `json_stream` and `csv`. Use the `format` query parameter to override it.<br/> To fetch the next page of results use `next_page_url` JSON response field or `x-next-page-url` CSV HTTP header if present.<br/><br/> If multiple metrics are requested in the same time the strict policy for partially available metrics among requested ones is applied: <ul>\n <li>missing metric name in the JSON response means that the metric is \"not a supported metric\" for the asset and frequency while some other requested metrics are supported.</li>\n <li>`null` value of the metric means \"no data in the database\" while some other requested metrics have data.</li>\n</ul>"
operationId: getTimeseriesAssetMetrics
x-codeSamples:
- label: Shell
source: 'curl --compressed "https://api.coinmetrics.io/v4/timeseries/asset-metrics?assets=btc&metrics=PriceUSD,SplyBMXNtv&start_time=2020-02-29&end_time=2020-03-01&frequency=1d&pretty=true&api_key=<your_key>"
'
- label: Python
source: 'import requests
response = requests.get(''https://api.coinmetrics.io/v4/timeseries/asset-metrics?assets=btc&metrics=PriceUSD,SplyBMXNtv&start_time=2020-02-29&end_time=2020-03-01&frequency=1d&pretty=true&api_key=<your_key>'').json()
print(response)
'
- label: Python Client
source: 'from coinmetrics.api_client import CoinMetricsClient
client = CoinMetricsClient(<your_key>)
response = client.get_asset_metrics(assets="btc", metrics="PriceUSD,SplyBMXNtv", start_time="2020-02-29", end_time="2020-03-01", frequency="1d").to_list()
print(response)
'
tags:
- Timeseries
parameters:
- $ref: '#/components/parameters/AssetMetricsAssetId'
- $ref: '#/components/parameters/AssetMetrics'
- $ref: '#/components/parameters/AssetMetricsFrequency'
- $ref: '#/components/parameters/Status'
- $ref: '#/components/parameters/StartTimeMutuallyExclusiveWithHeightAndHash'
- $ref: '#/components/parameters/EndTimeMutuallyExclusiveWithHeightAndHash'
- $ref: '#/components/parameters/StartHeightMutuallyExclusiveWithTimeAndHash'
- $ref: '#/components/parameters/EndHeightMutuallyExclusiveWithTimeAndHash'
- $ref: '#/components/parameters/StartHash'
- $ref: '#/components/parameters/EndHash'
- $ref: '#/components/parameters/StartInclusive'
- $ref: '#/components/parameters/EndInclusive'
- $ref: '#/components/parameters/MinConfirmations'
- $ref: '#/components/parameters/Timezone'
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PagingFrom'
- $ref: '#/components/parameters/Sort'
- $ref: '#/components/parameters/LimitPerAsset'
- $ref: '#/components/parameters/Pretty'
- $ref: '#/components/parameters/ResponseFormat'
- $ref: '#/components/parameters/NullAsZero'
- $ref: '#/components/parameters/NextPageToken'
- $ref: '#/components/parameters/IgnoreUnsupportedErrors'
- $ref: '#/components/parameters/IgnoreForbiddenErrors'
responses:
'200':
$ref: '#/components/responses/AssetMetrics'
'400':
$ref: '#/components/responses/AssetNotFound'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'414':
$ref: '#/components/responses/UriTooLong'
security:
- api_key: []
/timeseries/exchange-metrics:
servers:
- url: https://api.coinmetrics.io/v4
- url: https://community-api.coinmetrics.io/v4
get:
summary: Exchange metrics
description: Returns metrics for specified exchanges.<br/> Results are ordered by tuple `(exchange, time)`.<br/> To fetch the next page of results use `next_page_url` JSON response field.<br/>
operationId: getTimeseriesExchangeMetrics
x-codeSamples:
- label: Shell
source: 'curl --compressed "https://api.coinmetrics.io/v4/timeseries/exchange-metrics?exchanges=binance&metrics=volume_reported_spot_usd_1d&start_time=2020-01-01&end_time=2020-01-04&paging_from=start&frequency=1d&pretty=true&api_key=<your_key>"
'
- label: Python
source: 'import requests
response = requests.get(''https://api.coinmetrics.io/v4/timeseries/exchange-metrics?exchanges=binance&metrics=volume_reported_spot_usd_1d&start_time=2020-01-01&end_time=2020-01-04&paging_from=start&frequency=1d&pretty=true&api_key=<your_key>'').json()
print(response)
'
- label: Python Client
source: 'from coinmetrics.api_client import CoinMetricsClient
client = CoinMetricsClient(<your_key>)
response = client.get_exchange_metrics(exchanges="binance", metrics="volume_reported_spot_usd_1d", start_time="2020-01-01", end_time="2020-01-04", paging_from="start", frequency="1d").to_list()
print(response)
'
tags:
- Timeseries
parameters:
- $ref: '#/components/parameters/Exchanges'
- $ref: '#/components/parameters/ExchangeMetricsParam'
- $ref: '#/components/parameters/ExchangeMetricsFrequency'
- $ref: '#/components/parameters/StartTime'
- $ref: '#/components/parameters/EndTime'
- $ref: '#/components/parameters/StartInclusive'
- $ref: '#/components/parameters/EndInclusive'
- $ref: '#/components/parameters/Timezone'
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PagingFrom'
- $ref: '#/components/parameters/ExchangeSort'
- $ref: '#/components/parameters/LimitPerExchange'
- $ref: '#/components/parameters/Pretty'
- $ref: '#/components/parameters/Format'
- $ref: '#/components/parameters/NextPageToken'
responses:
'200':
$ref: '#/components/responses/ExchangeMetrics'
'400':
$ref: '#/components/responses/ExchangeNotFound'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'414':
$ref: '#/components/responses/UriTooLong'
security:
- api_key: []
/timeseries/exchange-asset-metrics:
servers:
- url: https://api.coinmetrics.io/v4
- url: https://community-api.coinmetrics.io/v4
get:
summary: Exchange-asset metrics
description: Returns metrics for specified exchange-asset.<br/> Results are ordered by tuple `(exchange_asset, time)`.<br/> To fetch the next page of results use `next_page_url` JSON response field.<br/>
operationId: getTimeseriesExchangeAssetMetrics
x-codeSamples:
- label: Shell
source: 'curl --compressed "https://api.coinmetrics.io/v4/timeseries/exchange-asset-metrics?exchange_assets=binance-btc&metrics=volume_reported_spot_usd_1d&start_time=2021-10-04&end_time=2020-10-07&paging_from=start&frequency=1d&pretty=true&api_key=<your_key>"
'
- label: Python
source: 'import requests
response = requests.get(''https://api.coinmetrics.io/v4/timeseries/exchange-asset-metrics?exchange_assets=binance-btc&metrics=volume_reported_spot_usd_1d&start_time=2021-10-04&end_time=2020-10-07&paging_from=start&frequency=1d&pretty=true&api_key=<your_key>'').json()
print(response)
'
- label: Python Client
source: 'from coinmetrics.api_client import CoinMetricsClient
client = CoinMetricsClient(<your_key>)
response = client.get_exchange_asset_metrics(exchange_assets="binance-btc", metrics="volume_reported_spot_usd_1d", start_time="2021-10-04", end_time="2020-10-07", paging_from="start", frequency="1d").to_list()
print(response)
'
tags:
- Timeseries
parameters:
- $ref: '#/components/parameters/ExchangeAssets'
- $ref: '#/components/parameters/ExchangeAssetMetricsParam'
- $ref: '#/components/parameters/ExchangeAssetMetricsFrequency'
- $ref: '#/components/parameters/StartTime'
- $ref: '#/components/parameters/EndTime'
- $ref: '#/components/parameters/StartInclusive'
- $ref: '#/components/parameters/EndInclusive'
- $ref: '#/components/parameters/Timezone'
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PagingFrom'
- $ref: '#/components/parameters/ExchangeAssetSort'
- $ref: '#/components/parameters/LimitPerExchangeAsset'
- $ref: '#/components/parameters/Pretty'
- $ref: '#/components/parameters/ResponseFormat'
- $ref: '#/components/parameters/NextPageToken'
responses:
'200':
$ref: '#/components/responses/ExchangeAssetMetrics'
'400':
$ref: '#/components/responses/ExchangeAssetNotFound'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'414':
$ref: '#/components/responses/UriTooLong'
security:
- api_key: []
/timeseries/exchange-pair-metrics:
servers:
- url: https://api.coinmetrics.io/v4
- url: https://community-api.coinmetrics.io/v4
get:
summary: Exchange-pair metrics
description: Returns metrics for specified exchange-pair.<br/> Results are ordered by tuple `(exchange_pair, time)`.<br/> To fetch the next page of results use `next_page_url` JSON response field.<br/>
operationId: getTimeseriesExchangePairMetrics
x-codeSamples:
- label: Shell
source: 'curl --compressed "https://api.coinmetrics.io/v4/timeseries/exchange-pair-metrics?exchange_pairs=binance-btc-usdt&metrics=volatility_implied_skew_delta_50_270d_expiration&start_time=2025-10-04&end_time=2025-10-07&paging_from=start&frequency=1d&pretty=true&api_key=<your_key>"
'
- label: Python
source: 'import requests
response = requests.get(''https://api.coinmetrics.io/v4/timeseries/exchange-pair-metrics?exchange_pairs=binance-btc-usdt&metrics=volatility_implied_skew_delta_50_270d_expiration&start_time=2025-10-04&end_time=2025-10-07&paging_from=start&frequency=1d&pretty=true&api_key=<your_key>'').json()
print(response)
'
- label: Python Client
source: 'from coinmetrics.api_client import CoinMetricsClient
client = CoinMetricsClient(<your_key>)
response = client.get_exchange_pair_metrics(exchange_pairs="binance-btc-usdt", metrics="volatility_implied_skew_delta_50_270d_expiration", start_time="2025-10-04", end_time="2025-10-07", paging_from="start", frequency="1d").to_list()
print(response)
'
tags:
- Timeseries
parameters:
- $ref: '#/components/parameters/ExchangePairs'
- $ref: '#/components/parameters/ExchangePairMetricsParam'
- $ref: '#/components/parameters/ExchangePairMetricsFrequency'
- $ref: '#/components/parameters/StartTime'
- $ref: '#/components/parameters/EndTime'
- $ref: '#/components/parameters/StartInclusive'
- $ref: '#/components/parameters/EndInclusive'
- $ref: '#/components/parameters/Timezone'
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PagingFrom'
- $ref: '#/components/parameters/LimitPerExchangePair'
- $ref: '#/components/parameters/Pretty'
- $ref: '#/components/parameters/ResponseFormat'
- $ref: '#/components/parameters/NextPageToken'
responses:
'200':
$ref: '#/components/responses/ExchangePairMetrics'
'400':
$ref: '#/components/responses/ExchangePairNotFound'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'414':
$ref: '#/components/responses/UriTooLong'
security:
- api_key: []
/timeseries/market-metrics:
servers:
- url: https://api.coinmetrics.io/v4
- url: https://community-api.coinmetrics.io/v4
get:
summary: Market metrics
description: Returns metrics for specified markets.<br/> Results are ordered by tuple `(market, time)`.<br/> To fetch the next page of results use `next_page_url` JSON response field.<br/>
operationId: getTimeseriesMarketMetrics
x-codeSamples:
- label: Shell
source: 'curl --compressed "https://api.coinmetrics.io/v4/timeseries/market-metrics?markets=binance-BTCUSDT-future&metrics=liquidations_reported_future_buy_usd_5m&start_time=2022-01-19T20:00:00Z&end_time=2022-01-19T21:00:00Z&paging_from=start&frequency=5m&pretty=true&api_key=<your_key>"
'
- label: Python
source: 'import requests
response = requests.get(''https://api.coinmetrics.io/v4/timeseries/market-metrics?markets=binance-BTCUSDT-future&metrics=liquidations_reported_future_buy_usd_5m&start_time=2022-01-19T20:00:00Z&end_time=2022-01-19T21:00:00Z&paging_from=start&frequency=5m&pretty=true&api_key=<your_key>'').json()
print(response)
'
- label: Python Client
source: 'from coinmetrics.api_client import CoinMetricsClient
client = CoinMetricsClient(<your_key>)
response = client.get_market_metrics(markets="binance-BTCUSDT-future", metrics="liquidations_reported_future_buy_usd_5m", start_time="2022-01-19T20:00:00Z", end_time="2022-01-19T21:00:00Z", paging_from="start", frequency="5m").to_list()
print(response)
'
tags:
- Timeseries
parameters:
- $ref: '#/components/parameters/MarketId'
- $ref: '#/components/parameters/MarketMetricsParam'
- $ref: '#/components/parameters/MarketMetricsFrequency'
- $ref: '#/components/parameters/StartTime'
- $ref: '#/components/parameters/EndTime'
- $ref: '#/components/parameters/StartInclusive'
- $ref: '#/components/parameters/EndInclusive'
- $ref: '#/components/parameters/Timezone'
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PagingFrom'
- $ref: '#/components/parameters/MarketMetricsSort'
- $ref: '#/components/parameters/LimitPerMarket'
- $ref: '#/components/parameters/Pretty'
- $ref: '#/components/parameters/ResponseFormat'
- $ref: '#/components/parameters/NextPageToken'
- $ref: '#/components/parameters/IgnoreUnsupportedErrors'
- $ref: '#/components/parameters/IgnoreForbiddenErrors'
responses:
'200':
$ref: '#/components/responses/MarketMetrics'
'400':
$ref: '#/components/responses/MarketNotFound'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'414':
$ref: '#/components/responses/UriTooLong'
security:
- api_key: []
/timeseries/pair-metrics:
servers:
- url: https://api.coinmetrics.io/v4
- url: https://community-api.coinmetrics.io/v4
get:
summary: Pair metrics
description: Returns metrics for specified asset pairs.<br/> Results are ordered by tuple `(pair, time)`.<br/> To fetch the next page of results use `next_page_url` JSON response field.<br/>
operationId: getTimeseriesPairMetrics
x-codeSamples:
- label: Shell
source: 'curl --compressed "https://api.coinmetrics.io/v4/timeseries/pair-metrics?pairs=btc-usd&metrics=volume_trusted_spot_usd_1d&frequency=1d&pretty=true&api_key=<your_key>"
'
- label: Python
source: 'import requests
response = requests.get(''https://api.coinmetrics.io/v4/timeseries/pair-metrics?pairs=btc-usd&metrics=volume_trusted_spot_usd_1d&frequency=1d&pretty=true&api_key=<your_key>'').json()
print(response)
'
- label: Python Client
source: 'from coinmetrics.api_client import CoinMetricsClient
client = CoinMetricsClient(<your_key>)
response = client.get_pair_metrics(pairs="btc-usd", metrics="volume_trusted_spot_usd_1d", frequency="1d").to_list()
print(response)
'
tags:
- Timeseries
parameters:
- $ref: '#/components/parameters/Pair'
- $ref: '#/components/parameters/PairMetricsParam'
- $ref: '#/components/parameters/PairMetricsFrequency'
- $ref: '#/components/parameters/StartTime'
- $ref: '#/components/parameters/EndTime'
- $ref: '#/components/parameters/StartInclusive'
- $ref: '#/components/parameters/EndInclusive'
- $ref: '#/components/parameters/Timezone'
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PagingFrom'
- $ref: '#/components/parameters/PairSort'
- $ref: '#/components/parameters/LimitPerPair'
- $ref: '#/components/parameters/Pretty'
- $ref: '#/components/parameters/Format'
- $ref: '#/components/parameters/NextPageToken'
responses:
'200':
$ref: '#/components/responses/PairMetrics'
'400':
$ref: '#/components/responses/PairNotFound'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'414':
$ref: '#/components/responses/UriTooLong'
security:
- api_key: []
/timeseries/pair-candles:
servers:
- url: https://api.coinmetrics.io/v4
- url: https://community-api.coinmetrics.io/v4
get:
summary: Pair candles
description: Returns candles for specified asset pairs.<br/> Results are ordered by tuple `(pair, time)`.<br/> To fetch the next page of results use `next_page_url` JSON response field.<br/>
operationId: getTimeseriesPairCandles
x-codeSamples:
- label: Shell
source: 'curl --compressed "https://api.coinmetrics.io/v4/timeseries/pair-candles?pairs=btc-usd&frequency=1d&pretty=true&api_key=<your_key>"
'
- label: Python
source: 'import requests
response = requests.get(''https://api.coinmetrics.io/v4/timeseries/pair-candles?pairs=btc-usd&frequency=1d&pretty=true&api_key=<your_key>'').json()
print(response)
'
tags:
- Timeseries
parameters:
- $ref: '#/components/parameters/PairWithCandle'
- $ref: '#/components/parameters/CandleFrequency'
- $ref: '#/components/parameters/StartTime'
- $ref: '#/components/parameters/EndTime'
- $ref: '#/components/parameters/StartInclusive'
- $ref: '#/components/parameters/EndInclusive'
- $ref: '#/components/parameters/Timezone'
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PagingFrom'
- $ref: '#/components/parameters/LimitPerPairCandle'
- $ref: '#/components/parameters/Pretty'
- $ref: '#/components/parameters/Format'
- $ref: '#/components/parameters/NextPageToken'
responses:
'200':
$ref: '#/components/responses/PairCandles'
'400':
$ref: '#/components/responses/PairNotFound'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'414':
$ref: '#/components/responses/UriTooLong'
security:
- api_key: []
/timeseries/protocol-metrics:
servers:
- url: https://api.coinmetrics.io/v4
get:
summary: Protocol metrics
description: Returns metrics for specified protocols.<br/> Results are ordered by tuple `(protocol, market)`.<br/> To fetch the next page of results use `next_page_url` JSON response field.<br/>
operationId: getTimeseriesProtocolMetrics
x-codeSamples:
- label: Shell
source: 'curl --compressed "https://api.coinmetrics.io/v4/timeseries/protocol-metrics?protocols=aave_v3&markets=core-weth&chains=ethereum&metrics=supply_apy&pretty=true&api_key=<your_key>"
'
- label: Python
source: 'import requests
response = requests.get(''https://api.coinmetrics.io/v4/timeseries/protocol-metrics?protocols=aave_v3&markets=core-weth&chains=ethereum&metrics=supply_apy&pretty=true&api_key=<your_key>'').json()
print(response)
'
tags:
- Timeseries
parameters:
- $ref: '#/components/parameters/Protocols'
- $ref: '#/components/parameters/ProtocolChains'
- $ref: '#/components/parameters/ProtocolMarkets'
- $ref: '#/components/parameters/ProtocolFrequency'
- $ref: '#/components/parameters/ProtocolMetrics'
- $ref: '#/components/parameters/StartTime'
- $ref: '#/components/parameters/EndTime'
- $ref: '#/components/parameters/StartInclusive'
- $ref: '#/components/parameters/EndInclusive'
- $ref: '#/components/parameters/Timezone'
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PagingFromWithStartByDefault'
- $ref: '#/components/parameters/NextPageToken'
- $ref: '#/components/parameters/CatalogResponseFormat'
- $ref: '#/components/parameters/Pretty'
responses:
'200':
$ref: '#/components/responses/ProtocolMetricsResponse'
'400':
$ref: '#/components/responses/ProtocolNotFound'
'401':
$ref: '#/components/responses/Unauthorized'
'414':
$ref: '#/components/responses/UriTooLong'
security:
- api_key: []
/timeseries/institution-metrics:
servers:
- url: https://api.coinmetrics.io/v4
- url: https://community-api.coinmetrics.io/v4
get:
summary: Institution metrics
description: Returns metrics for specified institutions.<br/> Results are ordered by tuple `(institution, time)`.<br/> To fetch the next page of results use `next_page_url` JSON response field.<br/>
operationId: getTimeseriesInstitutionMetrics
x-codeSamples:
- label: Shell
source: 'curl --compressed "https://api.coinmetrics.io/v4/timeseries/institution-metrics?institutions=grayscale&metrics=btc_total_assets&frequency=1d&pretty=true&api_key=<your_key>"
'
- label: Python
source: 'import requests
response = requests.get(''https://api.coinmetrics.io/v4/timeseries/institution-metrics?institutions=grayscale&metrics=btc_total_assets&frequency=1d&pretty=true&api_key=<your_key>'').json()
print(response)
'
- label: Python Client
source: 'from coinmetrics.api_client import CoinMetricsClient
client = CoinMetricsClient(<your_key>)
response = client.get_institution_metrics(institutions="grayscale", metrics="btc_total_assets", frequency="1d").to_list()
print(response)
'
tags:
- Timeseries
parameters:
- $ref: '#/components/parameters/Institution'
- $ref: '#/components/parameters/InstitutionMetricsParam'
- $ref: '#/components/parameters/InstitutionMetricsFrequency'
- $ref: '#/components/parameters/StartTime'
- $ref: '#/components/parameters/EndTime'
- $ref: '#/components/parameters/StartInclusive'
- $ref: '#/components/parameters/EndInclusive'
- $ref: '#/components/parameters/Timezone'
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PagingFrom'
- $ref: '#/components/parameters/InstitutionSort'
- $ref: '#/components/parameters/LimitPerInstitution'
- $ref: '#/components/parameters/Pretty'
- $ref: '#/components/parameters/Format'
- $ref: '#/components/parameters/NextPageToken'
responses:
'200':
$ref: '#/components/responses/InstitutionMetrics'
'400':
$ref: '#/components/responses/MarketNotFound'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'414':
$ref: '#/components/responses/UriTooLong'
security:
- api_key: []
/timeseries/market-trades:
servers:
- url: https://api.coinmetrics.io/v4
- url: https://community-api.coinmetrics.io/v4
get:
summary: Market trades
description: Returns trades for specified markets.<br/> Results are ordered by tuple `(market, time, coin_metrics_id)`.<br/> To fetch the next page of results use `next_page_url` JSON response field.
operationId: getTimeseriesMarketTrades
x-codeSamples:
- label: Shell
source: 'curl --compressed "https://api.coinmetrics.io/v4/timeseries/market-trades?start_time=2015-01-08T20:55:00Z&end_time=2015-01-08T21:00:00Z&paging_from=start&markets=coinbase-btc-usd-spot&pretty=true&api_key=<your_key>"
'
- label: Python
source: 'import requests
response = requests.get(''https://api.coinmetrics.io/v4/timeseries/market-trades?start_time=2015-01-08T20:55:00Z&end_time=2015-01-08T21:00:00Z&paging_from=start&markets=coinbase-btc-usd-spot&pretty=true&api_key=<your_key>'').json()
print(response)
'
- label: Python Client
source: 'from coinmetrics.api_client import CoinMetricsClient
client = CoinMetricsClient(<your_key>)
response = client.get_market_trades(start_time="2015-01-08T20:55:00Z", end_time="2015-01-08T21:00:00Z", paging_from="start", markets="coinbase-btc-usd-spot").to_list()
print(response)
'
tags:
- Timeseries
parameters:
- $ref: '#/components/parameters/MarketId'
- $ref: '#/components/parameters/StartTime'
- $ref: '#/components/parameters/EndTime'
- $ref: '#/components/parameters/StartInclusive'
- $ref: '#/components/parameters/EndInclusive'
- $ref: '#/components/parameters/Timezone'
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PagingFrom'
- $ref: '#/components/parameters/LimitPerMarket'
- $ref: '#/components/parameters/Pretty'
- $ref: '#/components/parameters/ResponseFormat'
- $ref: '#/components/parameters/NextPageToken'
- $ref: '#/components/parameters/TradeMinConfirmations'
responses:
'200':
$ref: '#/components/responses/MarketTrades'
'400':
$ref: '#/components/responses/MarketNotFound'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'414':
$ref: '#/components/responses/UriTooLong'
security:
- api_key: []
/timeseries/market-openinterest:
servers:
- url: https://api.coinmetrics.io/v4
- url: https://community-api.coinmetrics.io/v4
get:
summary: Market open interest
description: Returns open interest for specified futures markets.<br/> Results are ordered by tuple `(market, time)`.<br/> To fetch the next page of results use `next_page_url` JSON response field. Keep in mind that spot markets are not supported by this endpoint.<br/><br/> <b>Note:</b> The `value_usd` field in this endpoint was previously calculated using hardcoded logic that no longer reflects current contract specifications across all exchanges.<br/><br/> To address this, we have deprecated the `value_usd` field and introduced new, more accurate metrics available via the `/timeseries/market-metrics` endpoint.<br/><br/> These two metrics should be used as a replacement for the `value_usd` field going forward:<br/> - `open_interest_reported_future_usd` to represent the notional value of open interest in U.S. dollars for futures markets<br/> - `open_interest_reported_option_notional_usd` to represent the notional value of open interest in U.S. dollars for options markets<br/><br/> We also introduced `open_interest_reported_option_market_value_usd` to represent the market value of open interest in U.S. dollars for options markets.
operationId: getTimeseriesMarketOpenIntereset
x-codeSamples:
- label: Shell
source: 'curl --compressed "https://api.coinmetrics.io/v4/timeseries/market-openinterest?start_time=2020-08-05T23:00:00Z&end_time=2020-08-06T00:00:00Z&paging_from=start&markets=bitmex-XBTUSD-future&pretty=true&api_key=<your_key>"
'
- label: Python
source: 'import requests
response = requests.get(''https://api.coinmetrics.io/v4/timeseries/market-openinterest?start_time=2020-08-05T23:00:00Z&end_time=2020-08-06T00:00:00Z&paging_from=start&markets=bitmex-XBTUSD-future&pretty=true&api_key=<your_key>'').json()
print(response)
'
- label: Python Client
source: 'from coinmetrics.api_client import CoinMetricsClient
client = CoinMetricsClient(<your_key>)
response = client.get_market_openinterest(start_time="2020-08-05T23:00:00Z", end_time="2020-08-06T00:00:00Z", paging_from="start", markets="bitmex-XBTUSD-future").to_list()
print(response)
'
tags:
- Timeseries
parameters:
- $ref: '#/components/parameters/MarketId'
- $ref: '#/components/parameters/StartTime'
- $ref: '#/components/parameters/EndTime'
- $ref: '#/components/parameters/StartInclusive'
- $ref: '#/components/parameters/EndInclusive'
- $ref: '#/components/parameters/OpenInterestGranularity'
- $ref: '#/components/parameters/Timezone'
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PagingFrom'
- $ref: '#/components/parameters/LimitPerMarket'
- $ref: '#/components/parameters/Pretty'
- $ref: '#/components/parameters/ResponseFormat'
- $ref: '#/components/parameters/NextPageToken'
responses:
'200':
$ref: '#/components/responses/MarketOpenInterest'
'400':
$ref: '#/components/responses/MarketNotFound'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'414':
$ref: '#/components/responses/UriTooLong'
security:
- api_key: []
/timeseries/market-liquidations:
servers:
- url: https://api.coinmetrics.io/v4
- url: https://community-api.coinmetrics.io/v4
get:
summary: Market liquidations
description: Returns liquidations for specified futures markets.<br/> Results are ordered by tuple `(market, time)`.<br/> To fetch the next page of results use `next_page_url` JSON response field. Keep in mind that spot markets are not supported by this endpoint.
operat
# --- truncated at 32 KB (199 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/coin-metrics/refs/heads/main/openapi/coin-metrics-timeseries-api-openapi.yml