Hide navigation sidebar
Hide table of contents sidebar
Back to top
Toggle table of contents sidebar

# self.get_last_minute

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}")