Filters model

The filters model is used to filter the data you want to receive from the stream. The filters are applied to the data before it is sent to the client.

{
  "name": "MyWalletTransactions",
  "chainId": ["evm:1", "evm:56"],
  "events": ["trace", "log", "trasaction", "block", "swap"],
  "filters": {
    "and": [
      { "eq": ["action.from", "0x123456789"] },
      { "eq": ["transaction.receipt.status", "0x1"] }
    ]
  }
}

Filters table

FilterDescription
eqChecks if a field equals a specific value. The value can be a string, number, boolean or null. Example: { "eq": ["action.from", "0x123"] }
neqChecks if a field does not equal a specific value. The value can be a string, number, boolean or null. Example: { "neq": ["transaction.status", "0x0"] }
ltChecks if a numeric field is less than a specific value. The value is coerced to a number. Example: { "lt": ["block.number", 15000000] }
lteChecks if a numeric field is less than or equal to a specific value. The value is coerced to a number. Example: { "lte": ["transaction.value", 1000000] }
gtChecks if a numeric field is greater than a specific value. The value is coerced to a number. Example: { "gt": ["log.logIndex", 5] }
gteChecks if a numeric field is greater than or equal to a specific value. The value is coerced to a number. Example: { "gte": ["block.timestamp", 1672527600] }
inChecks if a field’s value is included in a specific value. The value can be a string, number, boolean or null. Example: { "in": ["action.to", "0x123"] }

Multiple filters

You can use multiple filters to get the data you need. The filters are applied in the order they are defined.

{
  "or": [
    {
      "and": [
        { "eq": ["log.address", "0x0000000000000000003456000000008766600000"] },
        { "gte": ["log.logIndex", "1"] },
      ],
    },
    {
      "and": [
        { "eq": ["transaction.transaction.to", "0x0000000000000000003456000000008766600000"] },
      ],
    },
  ],
};

More example

{
  "eq": [
    "topics.0",
    "0x830d2d700a97af574b186c80d40429385d24241565b08a7c559ba283a964d9b1"
  ]
}

{
  "eq": ["action.input", "0xd55ec697"]
},

Can’t find what you’re looking for? Reach out to us, response times < 1h.