Filter on stream for watch addresses

Hello!

I’m using the nodejs sdk to create a stream and then add many addresses to track the tx, my question is if it’s possible to filter and say I only want the address to be in from or it could be in to. I was looking at documentation but I didn’t see anything about it other than for contracts, in this case I don’t use a contract.

const options = {
        chains: [EvmChain.BSC_TESTNET],
        description: 'app:deposit',
        tag: 'addresses',
        includeContractLogs: false,
        includeNativeTxs: true,
        webhookUrl: Keys.MORALIS_WEBHOOK
      }

      const stream = await Moralis.Streams.add(options)

is there a possibility to do this?

Hi @vghernandz

Yes, it is possible to add a filter to match the address with the from or to address of the transaction event.

You can find out about all the available filters on the below docs.

Please have a look at it for more details on the filter and let us know if you have any questions.

Please note that filters only work on the contract events so if the wallet transactions has any internal transaction then you will receive the webhook for it anyway.