立即开始
Bitquery Tools

Bitquery Conditional Metrics

通过 Aident Loadout 使用 Bitquery Tools 的 Bitquery Conditional Metrics。执行前查看输入、输出、设置、价格和风险。

写入操作风险等级 2/5API 密钥连接

服务提供商说明

Generate a Bitquery GraphQL metric snippet with an if condition for count, sum, avg, min, or max, for embedding in a query. The snippet can include a distinct field for counts, a post-aggregation filter, and an alias.

价格与限制

价格
免费操作
统一支付
暂不支持

输入

  • ifobject
    必填
    Conditional filter to apply to the metric via the 'if:' attribute. Uses nested object structure matching Bitquery GraphQL filter syntax. Example: {'Block': {'GasUsed': {'gt': '0'}}} or {'Transaction': {'Success': true}}.
  • aliasstring
    GraphQL alias to prefix the metric output. Example: 'totalGas' produces 'totalGas: sum(...)'.
  • fieldstring
    必填
    The field to aggregate using 'of:' in GraphQL. Required for 'sum', 'avg', 'min', 'max' operations. For 'count' operation, this field is ignored unless using distinct_field. Example: 'Block_GasUsed', 'Transaction_Value'.
  • operationstring
    必填
    Type of metric operation to apply. Options: 'count' (count rows), 'sum' (sum values), 'avg' (average), 'min' (minimum), 'max' (maximum).
  • select_whereobject
    HAVING-style filter applied after aggregation via 'selectWhere:'. Useful for filtering aggregated results. Example: {'ge': '1000000'} to only include results >= 1000000.
  • distinct_fieldstring
    Field name for counting distinct values (only valid for 'count' operation). When provided, generates 'distinct: <field>' in the output. Example: 'Block_Number' to count distinct blocks.

可观察输出

  • data
    必填
    Data from the action execution
  • errorstring
    Error if any occurred during the execution of the action
  • successfulboolean
    必填
    Whether or not the action execution was successful or not

使用此操作的技能

相关使用场景

尚未关联经过验证的相关使用场景。

官方来源

服务提供商来源