CoinMetricsClient.get_exchange_asset_metrics
coinmetrics.api_client.CoinMetricsClient.get_exchange_asset_metrics(
exchange_assets,
metrics,
frequency=None,
page_size=None,
paging_from='start',
start_time=None,
end_time=None,
start_height=None,
end_height=None,
start_inclusive=None,
end_inclusive=None,
timezone=None,
sort=None,
limit_per_exchange_asset=None,
format='json_stream',
)
Returns metrics for specified exchange-asset.
- Parameters:
- exchange_assets (list (str ) , str) -- A list of exchange-asset pairs (e.g. "binance-btc") or patterns like
exchange-*or*-asset. - metrics (list (str ) , str) -- Example: metrics=open_interest_reported_future_usd,volume_reported_spot_usd_1d Comma separated metrics to request time series data for. Information on all available metrics can be found on page https://coverage.coinmetrics.io/exchange-asset-metrics-v2. Use the client.catalog_full_exchange_asset_metrics_v2() method for the full list of supported metrics per exchange-asset combination.
- frequency (str) -- frequency of the returned timeseries, e.g 15s, 1d, etc.
- page_size (int) -- number of items returned per page when calling the API. If the request times out, try using a smaller number.
- paging_from (PagingFrom , str) -- Defines where you want to start receiving items from, 'start' or 'end' of the timeseries.
- start_time (datetime , date , str) -- Start time of the timeseries (string or datetime). Datetime object may be timezone naive or aware. Multiple formats of ISO 8601 are supported: 2006-01-20T00:00:00Z, 2006-01-20T00:00:00.000Z, 2006-01-20T00:00:00.123456Z, 2006-01-20T00:00:00.123456789, 2006-01-20, 20060120
- end_time (datetime , date , str) -- End time of the timeseries (string or datetime). Datetime object may be timezone naive or aware. Multiple formats of ISO 8601 are supported: 2006-01-20T00:00:00Z, 2006-01-20T00:00:00.000Z, 2006-01-20T00:00:00.123456Z, 2006-01-20T00:00:00.123456789, 2006-01-20, 20060120
- start_height (int) -- Start block of the timeseries (only applicable when querying with frequency 1b).
- end_height (int) -- End block of the timeseries (only applicable when querying with frequency 1b).
- start_inclusive (bool) -- Flag to define if start timestamp must be included in the timeseries if present. True by default.
- end_inclusive (bool) -- Flag to define if end timestamp must be included in the timeseries if present. True by default.
- timezone (str) -- timezone of the start/end times in db format for example: "America/Chicago". Default value is "UTC". For more details check out API documentation page.
- sort (str) -- How results will be sorted, e.g. "exchange_asset", "time". Default is "exchange_asset".
- limit_per_exchange_asset (int) -- How many entries per exchange-asset the result should contain.
- format (str) -- Format of the response. Supported values are json, json_stream, csv. Default is json_stream. Setting format='json_stream' is generally more performant. page_size and paging_from is ignored when format='json_stream'.
- exchange_assets (list (str ) , str) -- A list of exchange-asset pairs (e.g. "binance-btc") or patterns like
Returns:
- DataCollection
- Exchange-Asset Metrics timeseries.