Staking Data
Objects

Metrics

Learn about the Metrics object type, how to query metric data, and handle historical values.

Metrics

The Metrics object represents a specialized structure that connects to multiple object types including Assets, Reward Options, Providers, and Validators. It stores timestamp-associated numeric data queryable as current values or time series.

There can be 100s of unique metrics per asset, provider, validator, or rewardOption. The API filters low-value metrics by default; you must specify showAll: true to retrieve all metrics, though this runs the risk of consuming too many credits.

Metrics Object Fields

FieldTypeDescription
idID!Unique identifier
assetAssetAssociated asset
providerProviderAssociated provider
rewardOptionRewardOptionAssociated reward option
validatorValidatorAssociated validator
labelStringHuman-readable label
metricKeyStringMetric identifier key
tooltipStringTooltip description
unitStringUnit of measurement
precisionIntDecimal precision
defaultValueFloat!Current/default value
editableMinFloatMinimum editable value
editableMaxFloatMaximum editable value
editableIntervalFloatEdit interval
variationJSONVariation data
changePercentagesJSONPercentage changes (24h, 7d, 30d, 90d, 1y)
changeAbsolutesJSONAbsolute changes (24h, 7d, 30d, 90d, 1y)
rewardOptionKeysJSONReward option keys
isEditableBooleanWhether metric is editable
createdAtDateCreation timestamp
standardBooleanStandard metric flag
approvedLatestBooleanLatest approval status
approvedHistoricalBooleanHistorical approval status

Interval Behavior

When using the interval argument without available data, the API backfills with the last available data point by default. You can set backfillInterval to false to return null values instead.

Sample Queries

Global Marketcap

To retrieve global metrics, set all entity filters to null:

{
  metrics(
    where: {
      asset: null
      provider: null
      rewardOption: null
      validator: null
      metricKeys: ["marketcap"]
    }
    limit: 1
  ) {
    defaultValue
    changeAbsolutes
    changePercentages
    createdAt
  }
}

Historical Reward Option Metrics

Query metrics for specific Reward Options, Assets, Providers, or Validators:

{
  rewardOptions(
    where: {
      inputAsset: { symbols: ["ETH"] }
      typeKeys: ["solo-staking", "pos"]
    }
    limit: 10
  ) {
    metrics(
      where: { metricKeys: ["reward_rate"], createdAt_lt: "2023-01-30" }
      limit: 10
    ) {
      metricKey
      defaultValue
      changePercentages
      createdAt
    }
  }
}
  • changeAbsolutes is the absolute change in the metric value within the last 24h, 7d, 30d, 90d, or 1y.
  • changePercentages is the percentage change in the metric value within the same timeframes.

On this page