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

    Type Alias MetricMetadataResponse

    MetricMetadataResponse: {
        bulk_supported?: boolean;
        descriptors?: {
            data_sharing_group?: string;
            description?: Record<string, string>;
            group?: string;
            name?: string;
            short_name?: string;
            tags?: string[];
        };
        is_pit?: boolean;
        modified: Date
        | undefined;
        parameters: Record<string, string[]>;
        parameters_defaults?: Record<string, string[]>;
        path: string;
        queried: Record<string, any>;
        refs: {
            docs?: string;
            metric_variant?: { base?: string; bulk?: string; pit?: string };
            studio?: string;
        };
        tier: number;
        timerange?: { max: number; min: number };
    }

    Metric metadata response type

    Type Declaration

    • Optionalbulk_supported?: boolean

      Whether bulk queries are supported for this metric

    • Optionaldescriptors?: {
          data_sharing_group?: string;
          description?: Record<string, string>;
          group?: string;
          name?: string;
          short_name?: string;
          tags?: string[];
      }

      Human-readable descriptors (name, tags, description)

    • Optionalis_pit?: boolean

      Whether this is a point-in-time metric

    • modified: Date | undefined

      When the metric's metadata was last updated, as a JS Date.

      The API sends unix seconds; the schema converts them to a Date (the only time field that is converted — see timerange and the time series/bulk t, which stay numbers). undefined when the field is absent or 0: 0 is treated as "no modification time recorded", not as 1970-01-01.

    • parameters: Record<string, string[]>

      List of all allowed parameters and their values for the metric

    • Optionalparameters_defaults?: Record<string, string[]>

      Default values of the parameters that have one, keyed by parameter name (e.g. { e: ['aggregated'] }: without e, the metric is served for aggregated). Only sent for metrics with a defaulted parameter, so undefined for most metrics.

    • path: string

      Metric path

    • queried: Record<string, any>

      Queried parameters for the metric

    • refs: {
          docs?: string;
          metric_variant?: { base?: string; bulk?: string; pit?: string };
          studio?: string;
      }

      Reference links for this metric

    • tier: number

      Access tier required for this metric, as a non-negative integer (e.g. 2). Type it as MetricMetadata['tier']; the deprecated string-based MetricTier does not describe this field.

    • Optionaltimerange?: { max: number; min: number }

      Available time range for this metric. Both bounds are unix timestamps in seconds (numbers, not Dates) — convert with new Date(min * 1000).

      • max: number

        Latest available data point, in unix seconds (number)

      • min: number

        Earliest available data point, in unix seconds (number)