WebSocket 流
与 HTTP 不同,使用 WebSockets,当您需要特定信息时,您无需不断发出请求。WebSockets 会为您维护网络连接(如果操作正确)并监听更改。您可以在此处查看官方文档。
wscat -c wss://api.chainup.net/ws/ethereum/mainnet/<YOUR_API_KEY>
< {"jsonrpc": "2.0", "id": 0, "method": "eth_gasPrice"}
< {"jsonrpc": "2.0","id":0,"result":"0x6f56b59ac"}
Last updated
Was this helpful?