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 object) – Asset object that has streaming data to cancel.

Returns

Return type

None

Example

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