CoinMetricsClient.get_pair_metrics

coinmetrics.api_client.CoinMetricsClient.get_pair_metrics(
    pairs,
    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_pair=None,
    format='json',
)

Returns metrics books for specified asset-asset pairs.

  • Parameters:

    • pairs (listarrow-up-right (strarrow-up-right ) , strarrow-up-right) -- List of asset pairs or patterns like btc-*, or *-btc. Use a corresponding client.catalog_pair_metrics_v2() method for the full list of supported pairs for a given data type.

    • metrics (listarrow-up-right (strarrow-up-right ) , strarrow-up-right) -- Example: metrics=volume_trusted_spot_usd_1h,volume_trusted_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/pair-metrics-v2arrow-up-right. Use the client.catalog_full_pair_metrics_v2() method for the full list of supported metrics per pair.

    • frequency (strarrow-up-right) -- frequency of the returned timeseries, e.g 15s, 1d, etc.

    • page_size (intarrow-up-right) -- number of items returned per page when calling the API. If the request times out, try using a smaller number.

    • paging_from (PagingFrom , strarrow-up-right) -- Defines where you want to start receiving items from, 'start' or 'end' of the timeseries.

    • start_time (datetime , date , strarrow-up-right) -- 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 , strarrow-up-right) -- 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 (intarrow-up-right) -- Start block of the timeseries (only applicable when querying with frequency 1b).

    • end_height (intarrow-up-right) -- End block of the timeseries (only applicable when querying with frequency 1b).

    • start_inclusive (boolarrow-up-right) -- Flag to define if start timestamp must be included in the timeseries if present. True by default.

    • end_inclusive (boolarrow-up-right) -- Flag to define if end timestamp must be included in the timeseries if present. True by default.

    • timezone (strarrow-up-right) -- 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 (strarrow-up-right) -- How results will be sorted, e.g."pair", "time". "pair" by default

    • limit_per_pair (intarrow-up-right) -- How many entries per asset pair the result should contain.

    • format (strarrow-up-right | None)

Returns:

Last updated

Was this helpful?