1

How would you go about pulling live mempool data like https://tzflow.com/? I have a private node and I've looked at the /chains/main/mempool/pending_operations endpoint, but I'm not sure how to stream pending transactions.

2 Answers 2

1

tzflow.com uses the /chains/main/mempool/monitor_operations RPC to get a stream of operations submitted to the mempool of one representative node.

As mentioned elsewhere here, the node closes this stream on each new block.

1
  • Aha! This is what I was looking for. Thanks.
    – bhaas
    Nov 16, 2022 at 18:32
0

/chains/main/mempool/monitor_operations streams pending transactions, but the connection is closed when the node gets a new head block. You can do this in a loop to keep streaming.

(Edited to replace pending with monitor in the RPC :-))

1
  • In the body of the response, I don't see anything marked as pending. It shows applied, refused, outdated, etc.
    – bhaas
    Nov 14, 2022 at 22:56

Your Answer

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

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