How to get pending transactions using Infura?

I used “etc_pendingTransactions” to get pending transactions, only to be informed : “The method eth_pendingTransactions does not exist/is not available”. Is there any API that I can use to get pending transactions?

Hi @sccyye we do not currently support this method, can you help us understand what you’re trying to do and we can possibly suggest an alternative?

Hello

I can maybe add to this as I have the same problem, the reason I am using it is because I am running a demo of a DAPP, essentially I have created a HD wallet using these different addresses as different participants in the smart contract. The problem ofcourse in doing this is that if I use a given address to send a token, and someone else from a different computer attempts to send a token with that same address, they will receive a revert error saying something like, ‘underpriced replacement transaction’. Instead as i load the data from a given address, I would like to know if the address has any pending transactions i should know of, to disable the send token button.

** Quick update **

Perhaps we don’t have to use Infura for this, I am currently working on the ropsten test network so i could just get this information from the ropsten etherscan api!
https://ropsten.etherscan.io/apis

It goes without saying that if there is a simpler web3 based version to achieve this I would appreciate learning about it.

Hi @Ignace_Loomans, welcome to the Infura community! There is a newPendingTransactions subscription that can be used for this purpose.