0

I'm trying to stream (or alternatively, repeatedly historically obtain over a short period of time) all native SOL transfers from a single sender wallet to a single receiver wallet. That is to say, I wish to omit all transfers that involve more than two wallets, and any transfers that involve tokens that are not native Solana (SOL) (this means ignoring WSOL too).

What's the best way to do this? I'm using Python, and the python solana.rpc package helps me stream all SOL transfers, or obtain the last 1000 transfers, however the get_transaction(Signature) function takes around a second per transaction. With approximately 1 transaction every 0.04 seconds, we lag excessively.

All suggestions appreciated.

EDIT: I know Bitquery has a stream functionality, but I think having that running 24/7 will be very very expensive.

1 Answer 1

1

If you can't query RPC fast enough to get everything you want, you might be able to get this done with simple polling and fetching. If your accounts are being included in ~100 transactions per block (1 per 0.04 seconds, which is very high), you might just want to get all of the blocks with getBlocks and then parse through them for your transactions: https://solana.com/docs/rpc/http/getblocks

If RPC isn't fast enough, then you might need to get a private RPC that can service these requests. Or you'll need to run a validator with a Geyser plugin that filters out all other transactions: https://docs.solanalabs.com/validator/geyser

On the other hand, if you're cost conscious, this might not be easily possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.