code: def next_tick(date, interval=15):
      '''
      Only return when we reach given datetime
      '''
      # Intuition works with utc dates, conversion are made for I/O
      now = dt.datetime.now(pytz.utc)
      live = False
      # Sleep until we reach the given date
      while now < date:
          time.sleep(interval)
          # Update current time
          now = dt.datetime.now(pytz.utc)
          # Since we're here, we waited a future date, so this is live trading
          live = True
      return livf next_tick(date, interval=15):
      '''
      Only return when we reach given datetime
      '''
      # Intuition works with utc dates, conversion are made for I/O
      now = dt.datetime.now(pytz.utc)
      live = False
      # Sleep until we reach the given date
      while now < date:
          time.sleep(interval)
          # Update current time
          now = dt.datetime.now(pytz.utc)
          # Since we're here, we waited a future date, so this is live trading
          live = True
      return live
docs: Only return when we reach given datetime