self.start_realtime_bars#

lumibot.strategies.strategy.Strategy.start_realtime_bars(self, asset, keep_bars=30)#

Starts a real time stream of tickers for Interactive Broker only.

This allows for real time data to stream to the strategy. Bars are fixed at every fix seconds. They will arrive in the strategy in the form of a dataframe. The data returned will be:

  • datetime

  • open

  • high

  • low

  • close

  • volume

  • vwap

  • count (trade count)

Parameters:
  • asset (Asset object) – The asset to stream.

  • keep_bars (int) – How many bars/rows to keep of data. If running for an extended period of time, it may be desirable to limit the size of the data kept.

Return type:

None