self.get_last_minute#

lumibot.strategies.strategy.Strategy.get_last_minute(self)#

Returns the last minute of the current day. In a backtest this will be the current bar’s timestamp. In live trading this will be the current timestamp on the exchange.

Returns:

The last minute of the current day.

Return type:

int

Example

>>> # Will return the last minute of the current day
>>> last_minute = self.get_last_minute()
>>> self.log_message(f"The last minute of the current day is {last_minute}")