WebSocket stream

Unlike HTTP, with WebSockets, you don't need to continuously make requests when you want specific information. WebSockets maintain a network connection for you (if done right) and listen for changes . You may view the official documentation here.

wscat -c wss://api.chainup.net/ws/polkadot/mainnet/<YOUR_API_KEY>
<  {"jsonrpc":"2.0","method":"chain_getBlock","params":[],"id":32}
<  {"jsonrpc":"2.0","result":{"block":{"header":{"parentHash":"0x8a55738db2a55ee21eadf27756348c6e3883c93fc4c55424511da8c5ea8d3a13","number":"0xb04b2a", ... }

Last updated