Monad RPC + WSS: what it’s for and how to use it (quickstart)
RPC is for standard requests (blocks, receipts, calls), WSS is for real-time streams (new blocks, logs). Here’s a quickstart + how to test both endpoints.
If you’re building anything that talks to an EVM chain, you’ll use two “pipes”:
- RPC (HTTPS) → request/response: read state, call contracts, send transactions
- WSS (WebSocket) → real-time: new blocks, logs/events, live monitoring
We run public Monad endpoints and snapshots, and we also support an enterprise tier for teams that need higher limits and support.
Endpoints
RPC (HTTPS)https://monad-mainnet-rpc.natsai.xyz
WSSwss://monad-mainnet-rpc.natsai.xyz
30-second RPC tests (copy/paste)
Latest block number
curl -s https://monad-mainnet-rpc.natsai.xyz \
-H "content-type: application/json" \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
Chain ID
curl -s https://monad-mainnet-rpc.natsai.xyz \
-H "content-type: application/json" \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
Real-time with WSS (new blocks)
If you have websocat installed, run:
websocat -t wss://monad-mainnet-rpc.natsai.xyz
Then paste this to subscribe to new blocks:
{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}
When you should use WSS (instead of polling)
- You want instant reactions to new blocks (indexers, alerts, monitoring)
- You want fewer wasted requests vs polling every X seconds
- You want smoother performance during spikes