I am trying to load forex Oanda minute data however the Jupyter notebook keeps crashing because there seem to be a limit to how many bars I can reference in history.

Therefore is it possible to load minute data in history without loading all the data from present until then? So to minimize the data size to be loaded.



total_bars = 4000000
daily_data = qb.History(qb.Securities.Keys, total_bars, Resolution.Minute)

date1 = datetime.strptime('2018-01-10 13:30:00', '%Y-%m-%d %H:%M:%S')
date2 = datetime.strptime('2018-01-10 14:00:00', '%Y-%m-%d %H:%M:%S')

print(c.loc[(c['time'] > date1) & (c['time'] < date2)])


I only want a small chunck of data in 2018 not every minute data from then till present... How do I do it?