Is it possible to know the average number of pending transactions for a larger period of time? For this chart (https://etherscan.io/chart/pendingtx), I can only figure the most recent 5 days. I would like to make an estimation about the average pending transactions, so it would be great if I can get the data within a larger period of time.

While it is feasible to use web3 API to get the real-time pending transactions, I am wondering whether it is also feasible to collect the historical data.

bumped to the homepage by Community 2 days ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


You can collect real time txpool data using web3.txpool.pending. You can process and save the data to recreate an etherscan-like chart you described in the question.

It is impossible to collect the historical data from a node (if someone has saved it elsewhere and is offering it, you can get it this way). This is because these transactions are either included in a block or discarded completely. It is obvious that transactions included in a block were in the txpool, so I assume that information is not relevant to you. The transactions that are never included are not saved on the node layer, so you cannot collect historical data of transactions that have been dropped.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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