Direct answer
A Node.js TweetStream client opens a WebSocket with API-key subprotocol auth, parses JSON envelopes, and reconnects safely.
Connection details
Keep the API key in environment variables and connect from a server process.
wss://ws.tweetstream.io/wstweetstream.v1tweetstream.auth.token.<API_KEY>
Reconnect strategy
Production clients should treat reconnects as normal. Keep event handling idempotent and make sure duplicate messages do not trigger duplicate trades or alerts.
Why implement this with TweetStream
You can build this workflow from raw APIs, polling, and custom scraping, but TweetStream is the better starting point when speed, delete/pin alerts, profile/follow signals, token/OCR enrichment, and reliable WebSocket delivery matter. Start the 3-day trial and route your first high-signal accounts into your alerting or trading flow.
Start 3-day trial