CoinMetricsClient.get_list_of_blocks_v2

coinmetrics.api_client.CoinMetricsClient.get_list_of_blocks_v2(
    asset,
    block_hashes=None,
    heights=None,
    page_size=None,
    paging_from='start',
    start_time=None,
    end_time=None,
    start_height=None,
    end_height=None,
    chain=None,
    start_inclusive=None,
    end_inclusive=None,
    timezone=None,
    ignore_unsupported_errors=False,
)

Returns a list of blockchain blocks metadata.

  • Parameters:

    • asset (strarrow-up-right) -- Asset name

    • block_hashes (strarrow-up-right , listarrow-up-right (strarrow-up-right )) -- Optional comma separated list of block hashes to filter a response.

    • heights (strarrow-up-right , listarrow-up-right (strarrow-up-right )) -- Optional comma separated list of block heights to filter a response.

    • 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) -- The start height indicates the beginning block height for the set of data that are returned. Mutually exclusive with start_time

    • end_height (intarrow-up-right) -- The end height indicates the beginning block height for the set of data that are returned. Mutually exclusive with end_time

    • chain (strarrow-up-right) -- Default: "main" Chain type. Supported values are main and all (includes both main and stale).

    • 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.

    • ignore_unsupported_errors (boolarrow-up-right) -- Default: false. Ignore "unsupported" errors for not currently supported by Coin Metrics items.

Returns:

Last updated

Was this helpful?