self.get_tracked_assets¶
- lumibot.strategies.strategy.Strategy.get_tracked_assets(self)
Get the list of assets for positions and open orders for the current strategy
- Returns:
A list of assets for the strategy if there are tracked positions or returns and empty list to indicate no tracked.
- Return type:
list
Example
>>> # Get all tracked assets >>> assets = self.get_tracked_assets() >>> for asset in assets: >>> # Show the asset name >>> self.log_message(asset.symbol) >>> # Show the quantity of the asset >>> self.log_message(asset.quantity)