I'm interested in trying to find all transactions for a specific program that include a specific instruction. Take this Mango transaction for example, I can see that someone is placing multiple Perp Orders: https://explorer.solana.com/tx/4xMtowmeRpcoyvXMqsmckKvTrkkNoCibinvrQ2ZJtnBtPAvj7xXTVn7jb3oRsf2KFCWjmFMMHSZua4AtAUkP26MW.

Here and in many other programs useful information is outputted in the program instruction logs. Ideally I'd like to search for specific transactions based on messages in the logs. Is there a good way to do this? I know some people use Geyser plugins and PostgreSQL for this purpose, but I don't have access to a validator so I'm not sure what my options are.

1 Answer 1


All Geyser plugin does is it streams current account updates and transactions. Unless you need listen to many programs, you can do the same with RPC by using subscribe to websocket API.

To subscribe to program logs, you can use logsSubscribe method. When you find the information you need in log, you can use getTransaction method to get all details of this transaction including its instructions.

  • It seem that logSubscribe would only give me events as they happen correct? If I'm interested in looking back in time a week or month, I think I'd need something like getSignaturesForAddress combined with a bunch of getTransaction calls
    – seruob
    Commented Aug 1, 2022 at 19:41

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.