Running Examples¶
JetSocket ships with runnable examples in the examples/ directory.
Setup¶
Clone the repo and build the Cython extension:
Quick Reference¶
| Example | Command | Requires |
|---|---|---|
| Binance Trades | uv run --extra pydantic python examples/binance_trades.py |
pydantic |
| Multi-Symbol Dashboard | uv run python examples/multi_symbol_dashboard.py |
- |
| Sync Price Analysis | uv run python examples/sync_simple.py |
- |
| LLM Streaming | OPENAI_API_KEY="sk-..." uv run python examples/llm_streaming.py |
OpenAI API key |
Notes¶
- Binance examples connect to public market data streams — no API key needed
- LLM example requires an
OPENAI_API_KEYenvironment variable - Press Ctrl+C to stop any long-running example
- All Binance examples use the
/wsendpoint with dynamicSUBSCRIBEmessages - The sync example uses the
/stream?streams=combined endpoint