self.cancel_realtime_bars

lumibot.strategies.strategy.Strategy.cancel_realtime_bars(self, asset)

Cancels a stream of real time bars for a given asset.

Cancels the real time bars for the given asset.

Parameters:

asset (Asset) – Asset object that has streaming data to cancel.

Return type:

None

Example

>>> # Cancel the real time bars for SPY
>>> asset = self.create_asset("SPY")
>>> self.cancel_realtime_bars(asset)