Hi community!

Following up this previous post, we are adding the extendedMarketHours parameter to every method in the History API. As of now, only one history method received the parameter.

As with the fillDataForward parameter, the extendedMarket parameter will be renamed to extendedMarketHours for consistency among the APIs. Only a small sub set of methods will have breaking changes and only users using them with named parameters will need to update their code. Here is a list of the methods affected by the breaking changes from the extendedMarket parameter name change to extendedMarketHours:

  • C# history with multiple symbols and date range:
// History(symbols, start, date, extendedMarket: true);
History(symbols, start, date, extendedMarketHours: true);
  • Python history with multiple symbols and date range:
# self.History(symbols, start, date, extendedMarket=true)
self.History(symbols, start, date, extendedMarketHours=true)
  • Python history with data type, multiple symbols and date range:
# self.History(TradeBar, symbols, start, date, extendedMarket=true)
self.History(TradeBar, symbols, start, date, extendedMarketHours=true)
  • QuantBook option history:
# qb.GetOptionHistory(Symbols.SPX, "SPXW", start, date, extendedMarket=true)
qb.GetOptionHistory(Symbols.SPX, "SPXW", start, date, extendedMarketHours=true)
  • QuantBook future history:
# qb.GetFutureHistory(Futures.Indices.SP500EMini, start, date, extendedMarket=true)
qb.GetFutureHistory(Futures.Indices.SP500EMini, start, date, extendedMarketHours=true)

Again, we understand this is a breaking change and apologize in advance, we are aiming at having a more consistent and complete API in Lean. Once this is shipped, please update your algorithms and research notebooks using the named parameter extendedMarket to use extendedMarketHours instead.

As always, please let us know any concerns you may have about this so we can look into it ASAP.

Happy coding!