JSON RPC: Listening for transactions on account

Good evening,

I’m creating a webapp that listens for incoming transactions on an account, and records the transaction amount + sender pubkey in a db.

blockSubscribe would be the perfect solution, but it’s “unstable, disabled by default”, so what’s the recommended way to do this with websockets?

You might be able to use logSubscribe, but I’m not 100% sure that would work.

Otherwise, maybe combining slotSubscribe with a check for the latest transactions for the account you are interested in. I’m not sure.

You might be able to find people who have done this on the Solana developer discord.

1 Like

@maksumic looking at the terminology for “slot”, it looks like one block is produced every slot, so subscribing to slots might be equivalent for your purpose.