TweetStream

TweetStream integrations

Working code for common TweetStream integrations.

Every guide connects to the same authenticated WebSocket endpoint used across TweetStream: wss://ws.tweetstream.io/ws. Choose your stack for a working example and deployment notes.

These guides are built for production alert pipelines. They cover API key authentication, reconnects, message envelopes, and how to pass each real-time tweet event to the system that acts on it. For a trading team, that might be a bot, a Discord channel, an internal dashboard, or a rules engine.

Need the protocol shape first? Start with the WebSocket quickstart, then open the guide that matches your deployment. Each integration receives the same payloads, including account data, text, media context, token detections, OCR output, and enrichment fields when available.

Python + websockets

Stream TweetStream tweets into a Python trading bot with the `websockets` package, automatic reconnects, and envelope routing.

Discord webhooks

Forward filtered TweetStream alerts to a Discord channel through webhooks. You do not need a bot user or OAuth flow.

Put the live feed to work

Start with the X accounts that matter, then route events to your bots, alerts, and trading workflows.