Filter Query Results
info
This is an example that utilizes a filter to retrieve assets based on specific conditions.
{
assets(where: {symbols: ["ETH"]}, limit: 1) {
id
name
slug
symbol
metrics(where: {metricKeys: ["price", "staking_marketcap"]}, limit: 2) {
metricKey
unit
defaultValue
changePercentages
}
}
}
The filter specifies the symbol of the asset to be "ETH" and limits the number of results to 1. The query also filters the metrics being retrieved by specifying the metric keys and limiting the number of metrics to 2.