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

    Interface MetricParams

    Query parameters for callMetric, callBulkMetric, getMetricMetadata and getMetricStats. The common Glassnode parameters are typed below; any other parameter a metric documents can be passed too (see MetricParamValue for how values are converted).

    Multiple values: an array is sent as the parameter repeated once per element, in order — { a: ['BTC', 'ETH'] } → a=BTC&a=ETH (Glassnode's form for multi-value filters such as a, e or network on bulk endpoints; a comma-joined string is not equivalent). Each element is converted like a single value. An empty array, an undefined/null/array/object element, and an array for the single-valued s, u, i, c or f are rejected with a GlassnodeInputError.

    Set by the client and so not accepted here: api_key (configure apiKey), f other than 'json', and — in getMetricMetadata / getMetricStats — path (it comes from the metricPath argument).

    interface MetricParams {
        a?: string | readonly string[];
        api_key?: undefined;
        c?: string;
        e?: string | readonly string[];
        f?: string;
        i?: MetricInterval;
        s?: MetricTime;
        u?: MetricTime;
        [name: string]: MetricParamValue | readonly MetricParamValue[] | undefined;
    }

    Indexable

    • [name: string]: MetricParamValue | readonly MetricParamValue[] | undefined

      Any other parameter documented for the metric; an array sends it repeated. undefined omits it.

    Index
    a?: string | readonly string[]

    Asset symbol, e.g. 'BTC', 'ETH' ('*' for all assets on bulk endpoints), or several as an array (['BTC', 'ETH'] → a=BTC&a=ETH).

    api_key?: undefined

    Not allowed — set apiKey in the GlassnodeAPI config instead.

    c?: string

    Currency of the values, e.g. 'native' or 'usd' (metric-dependent).

    e?: string | readonly string[]

    Exchange, for exchange-specific metrics, e.g. 'binance', or several as an array.

    f?: string

    Response format. Only 'json' (case-insensitive) is supported; the client sets it anyway.

    Interval (resolution), e.g. '1h', '24h'.

    Since: start of the time range, unix seconds or a Date.

    Until: end of the time range, unix seconds or a Date.