Websocket Example

An example for streaming Solana data via websockets.
Here's an example of how to setup a simple websocket connection that listens for account changes on the Jump Crypto account (5yv..ZtE).
Make sure to first quickly generate an API key at​
const solanaWeb3 = require('@solana/web3.js')
const connection = new solanaWeb3.Connection("<YOUR API KEY HERE>");
(async () => {
new solanaWeb3.PublicKey("5yv6Vh8FNx93TXeSS94xy8VLZMbTqx4vXp7Zg5bDLZtE"),
(updatedAccountInfo, context) =>
console.log("Updated account info: ", updatedAccountInfo),