This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import WebSocket from 'ws' | |
const APIKEY = 'myapiKeyIsHere' | |
// Connection Type: | |
const ws = new WebSocket('wss://delayed.polygon.io/stocks') // stocks 15-min delay | |
// Connection Opened: | |
ws.on('open', () => { | |
console.log('Connected!') |