Hi, 

I want play with some 0DTE on SPX, I set my filter to IncludeWeeklys(). The last line of the script returns only the monthly expiry.

FYI: I am using this code in Notebook (Research) and I have  a free tier account.

qb = QuantBook()
index =  qb.add_index('SPX' )
# Request some historical data.
index_history = qb.history(index.symbol, datetime(2024, 5, 1), datetime(2024, 5, 2), Resolution.MINUTE, fill_forward=False, extended_market_hours=False)
index_option = qb.add_index_option(index.symbol, 'SPXW')
index_option.set_filter(lambda u: u.IncludeWeeklys())  

option_history = qb.option_history(index.symbol, datetime(2024, 5, 1), \
    datetime(2024, 5, 2), Resolution.MINUTE, fill_forward=False, extended_market_hours=False)
df = option_history.data_frame
x = df.reset_index() 
pd.unique(x.expiry)