I am using the URL "https://mainnet.infura.io/v3/key".
But I can't get a pending transaction.
This is my code.
pendingTransaction = web3.eth.filter('pending')
I had an error like this.
The method eth_newPendingTransactionFilter does not exist/is not available.
What reason this error?
Best Answer
You cannot get pending transactions using the standard Infura endpoint. I recommend to use chainstack.com, it's free and it works.
Then you can use web3.py to get the pending transactions. I have a repo about this here if you want to check it out. But the main code is this: