This API allows you to manage filters you would like to create for an Allium stream.
A filter is a binary comparison operator that allows you to compare a field in a the stream message to a target value. For example, message.to_address = a target address.
Supported comparison operators are '=', '!=', '>', '<', '>=', '<=', 'IN', and 'NOT IN'
Examples
This is an example of a request body to create a filter:
POST /filters
{
"input_stream": "arbitrum.erc20_token_transfers",
"field": "from_address",
"operator": "=",
"data_type": "array",
"value": [
"0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5"
]
}
Supported data types are string, numeric, and array.
This is an example of the request body needed to add values to a filter.
POST /filters/<id>/values
[
"0x3CAcB76c72D3a002B1d3b9399f82084C6f71cFB1",
"0xe9f3f31A34AfFC37FAA7521fe2Bd09Af32a925Bb"
]
In order to add values to a filter, the data_type for the filter must by array.