WebSocket + subscriptions

Can anyone help me with subscriptions to event with WebSocket speedynodes endpoints?
Now I use ethers.providers.JsonRpcProvider to subscribe events on BSC network and all works fine except a huge number of requests of changes each 4 seconds.
I decided to change connection to ethers.providers.WebSocketProvider with appropriate URL. The subscribe call for events works fine but now no events fired at all.
Can anyone help me or point to documentation? :slight_smile:

we recommend using a server to sync events real time or historical, you can also use web3api to get events

https://docs.moralis.io/moralis-dapp/automatic-transaction-sync/smart-contract-events#sync-and-watch-contract-events
https://docs.moralis.io/moralis-dapp/web3-api/native#getlogsbyaddress-new

We don’t aim at being a node provider, there will be some changes to nodes in the near future:

1 Like