I'm not able to properly request to Emini S&P Select Sector futures data (see example below). Based on the sample code provided in the library, I try to subscribe in the initializiation as follows:

def Initialize(self): self.SetStartDate(2019, 1, 1) # Set Start Date self.SetCash(100000) # Set Strategy Cash self.AddSecurity(SecurityType.Future, "XAP", Resolution.Minute).SetFilter(timedelta(0), timedelta(days=360))

but when I try to pick the front month contract, it seems there's no data is pumped into OneData:

def OnData(self, data): for chain in data.FutureChains: if chain.Key.Value == "XAP": if self.front_xap.Expiry - self.Time).days <= 1): xap_contracts = list(filter(lambda x: x.Expiry >= self.Time + timedelta(days=10), chain.Value))

I don't see any helper static classes in the futures reference table in the documentation either (to use with the AddFuture method).

What would be the proper way to subscribe to these futures? Or it's not possible to subscribe to this data at this point?

Author