Stream Filter isn't functioning as expected

Hi there. I’m trying to only read txns with ETH values that are in a specific range.

the stream works but it also reads data that don’t meet my criteria. here is my code

# greater than eth value: 0.1 eth
filter_gt = f"{int(0.1 * 1e18)}"

# less than eth value: 5 eth
filter_lt = f"{int(5 * 1e18)}"

transaction_abi = {
    "anonymous": False,
    "inputs": [
    {
        "indexed": True,
        "name": "from",
        "type": "address"
    },
    {
        "indexed": True,
        "name": "to",
        "type": "address"
    },

    {
        "indexed": True,
        "name": "tokenId",
        "type": "uint256"
    }
    ],
    "name": "Transfer",
    "type": "event"
}

body = {
    'webhookUrl': my_webhook,
    'description': 'base chain',
    'tag': 'base_chain',
    'topic0': ['Transfer(address,address,uint256)'],
    'allAddresses': False,
    'includeNativeTxs': True,
    'includeContractLogs': True,
    'includeInternalTxs': False,
    'includeAllTxLogs': False,
    'getNativeBalances': [],
    'triggers': [],
    'abi': [transaction_abi],
    'advancedOptions': [
        {
            'topic0': 'Transfer(address,address,uint256)',
            'filter': {'and': [{'gt': ['value', filter_gt]}, {'lt': ['value', filter_lt]}]},
            "includeNativeTxs": True
        },
    ],
    'chainIds': ['0x2105'],
    "demo": False,
}

I’m using the python-sdk. Am i missing something here?

here is my stream config:

{
    'id': '0828713a-3461-4c0a-----',
    'webhookUrl': 'http:/.../ccc',
    'description': 'base chain',
    'tag': 'base_chain',
    'demo': False,
    'topic0': ['Transfer(address,address,uint256)'],
    'allAddresses': False,
    'includeNativeTxs': True,
    'filterPossibleSpamAddresses': False,
    'includeContractLogs': True,
    'includeInternalTxs': False,
    'includeAllTxLogs': False,
    'getNativeBalances': [],
    'triggers': [],
    'abi': [
        {
            'anonymous': False,
            'inputs': [
                {'indexed': True, 'name': 'from', 'type': 'address', 'abi.0.inputs.0.type': 'address', 'abi.0.inputs.0.name': 'from'},
                {'indexed': True, 'name': 'to', 'type': 'address', 'abi.0.inputs.1.type': 'address', 'abi.0.inputs.1.name': 'to'},
                {'indexed': True, 'name': 'tokenId', 'type': 'uint256', 'abi.0.inputs.2.type': 'uint256', 'abi.0.inputs.2.name': 'tokenId'}
            ],
            'name': 'Transfer',
            'type': 'event',
            'abi.0.type': 'event',
            'abi.0.name': 'Transfer'
        }
    ],
    'advancedOptions': [
        {
            'topic0': 'Transfer(address,address,uint256)',
            'filter': {'and': [{'gt': ['value', '100000000000000000']}, {'lt': ['value', '5000000000000000000']}]},
            'includeNativeTxs': True
        }
    ],
    'chainIds': ['0x2105'],
    'status': 'active',
    'statusMessage': 'Stream is active',
}

@cryptokid hey there. would really appreciate if you could have a look at this.

Hi @mjo98

I see that your streams config has includeNativeTxs set to true. However filters does not work on the native transactions of a wallet so you might be receiving webhooks for every native transaction of the wallet address.

Does that explain the issue you are facing?