Commencer maintenant
Bitquery Tools

Bitquery Conditional Metrics

Utilisez Bitquery Conditional Metrics avec Bitquery Tools via Aident Loadout. Vérifiez les entrées, sorties, la configuration, le tarif et le risque avant exécution.

Action d'écritureNiveau de risque 2 sur 5Connexion par clé API

Description du fournisseur

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.

Tarifs et limites

Tarif
Action gratuite
Paiement unifié
Non pris en charge actuellement

Entrées

  • ifobject
    Obligatoire
    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
    Obligatoire
    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
    Obligatoire
    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.

Sortie observable

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

Skills qui utilisent cette Action

Cas d’usage associés

Aucun cas d’usage associé et vérifié pour le moment.

Source officielle

Source du fournisseur