Receive Real Time Bars

View as MarkdownOpen in Claude

EWrapper.realtimeBar (

reqId: int. Request identifier used to track data.

time: long. The bar’s start date and time (Epoch/Unix time)

open: double. The bar’s open point

high: double. The bar’s high point

low: double. The bar’s low point

close: double. The bar’s closing point

volume: decimal. The bar’s traded volume (only returned for TRADES data)

WAP: decimal. The bar’s Weighted Average Price rounded to minimum increment (only available for TRADES).

count: int. The number of trades during the bar’s timespan (only available for TRADES).
)

Receives the real time 5 second bars.

1def realtimeBar(self, reqId: TickerId, time:int, open_: float, high: float, low: float, close: float, volume: Decimal, wap: Decimal, count: int):
2 print("RealTimeBar. TickerId:", reqId, RealTimeBar(time, -1, open_, high, low, close, volume, wap, count))