bsc icon indicating copy to clipboard operation
bsc copied to clipboard

Subscribing to pending transactions

Open ErrorEater opened this issue 5 years ago • 3 comments

Hi, I'm trying to subscribe for pending transactions in Binance-Chain but getting method not found response. Is there a way to make it work? In GitHub page I see there is an implementation of that method but not working.

REQUEST: {"id":"31ee4287-2e45-433b-9ce6-610c1f4cca96","jsonrpc":"2.0","method":"eth_subscribe","params":["newPendingTransactions"]}

RESPONSE:

{
  "jsonrpc": "2.0",
  "id": "31ee4287-2e45-433b-9ce6-610c1f4cca96",
  "error": {
    "code": -32601,
    "message": "Method not found"
  }
}

IMPLEMENTATION: https://github.com/search?q=org%3Abinance-chain+newPendingTransactions&type=code

ErrorEater avatar Feb 17 '21 09:02 ErrorEater

I found this web3.js based implementation to be helpful. https://support.chainstack.com/hc/en-us/articles/900003426246-Subscribing-to-global-new-pending-transactions

chiragpandya7 avatar Mar 23 '21 16:03 chiragpandya7

The catch is you need to have your own node to do that. Same is with Ethereum nodes, public ones don't provide transactions. My goal was to get them directly from BSC without installing my own private node.

ErrorEater avatar Mar 28 '21 17:03 ErrorEater

Bump -- is there any provider that offers this stream? I would be willing to pay for such a service... But I don't want to run my own node.

p-i- avatar Jun 17 '21 22:06 p-i-