Is there a way I can get all pending transactions to a given address/contract? I could get the confirmed transactions by exploring transactions in recent blocks. But how would I go about getting current pending and unconfirmed transactions to a specific address/contract?
For example, I can go to https://etherscan.io/address/ and I can see "(pending) 6 seconds ago". How does etherscan.io determine this? I'd like to do this myself. Do I need to run a node? A friend mentioned something about a listener, but i'm not sure if that's the right direction.
******* Edit ********
This etherscan API doesn't seem to return any pending transactions. Only ones in a block. But their website clearly shows pending transactions...