glassnode-api - v0.29.3
    Preparing search index...

    Type Alias MetricParamValue

    MetricParamValue: string | number | boolean | Date

    A query parameter value. Converted to a string before the request is sent:

    • string — sent unchanged.
    • number — its shortest round-trip decimal form (String(n), locale-independent), e.g. 1609459200, 0.1; -0 is sent as 0. NaN, ±Infinity, integers outside the safe range (|n| > Number.MAX_SAFE_INTEGER) and values that would print in exponent notation (e.g. 1e-7) are rejected — pass such values as a string.
    • boolean — 'true' / 'false'.
    • Date — unix seconds, floored to the whole second the instant falls in (milliseconds are dropped; 2021-01-01T00:00:00.999Z → 1609459200). An invalid Date is rejected.
    • undefined — the parameter is omitted (as if the key were absent).

    null and any other type (objects, bigints, …) are rejected. Rejections are a GlassnodeInputError with argument params.<name>, raised before any request is sent.

    To send several values for one parameter, pass an array of these values (see MetricParams): it is sent as the parameter repeated, e.g. a=BTC&a=ETH.