Descriptions:
Part Time Larry continues his four-part Full Stack Interactive Brokers API series, adding real-time streaming price data to the historical chart built in Part 1. This installment focuses on implementing Server-Sent Events (SSE) — a one-way server-to-browser push protocol — using FastAPI on the backend and the TradingView Lightweight Charts library on the frontend, chosen over WebSockets for its simpler one-directional data flow.
The tutorial walks through the complete architecture: the browser posts to a /subscribe endpoint, which uses FastAPI’s dependency injection to grab the existing IBKR connection (established in Part 1) and subscribe to real-time 5-second bars via the ib_async library. A second /stream endpoint holds an open HTTP connection and pushes new candle data as it arrives. A ChartState object tracks three distinct bar states — new candle initialization, in-progress real-time update, and candle finalization — enabling the TradingView chart widget to render a smoothly blending feed of historical and live OHLC data.
The host codes live throughout, catching a missing import block (math, asyncio, json) and an indentation error in the onbar callback in real time, making the debugging process explicit and instructive. Viewers following along will come away with a working FastAPI and Interactive Brokers backend that streams live minute bars to a browser chart, with the historical data from the previous episode flowing seamlessly into the real-time feed. The series targets Python developers building custom trading dashboards or market data tooling.
📺 Source: Part Time Larry · Published December 04, 2025
🏷️ Format: Tutorial Demo







