zipline-live / zipline

Zipline-Live, a Pythonic Algorithmic Trading Library
http://www.zipline-live.io/
Apache License 2.0
394 stars 65 forks source link

When asking for last x minute data during trading, one gets ingested data, not recent data #96

Open peterfabakker opened 6 years ago

peterfabakker commented 6 years ago

eg at 1pm ET, ask form the last 15 minutes of minute data of a ticker and you wont get it. You will get the last ingested data. Solution: when asking for minute data during the day, a portion should be queried directly from IB

reqHistoricalData( tickerId, contract, (intdate.strftime('%Y%m%d %H:%M:%S') + ' GMT'), (duration), (barsize), (what), int(useRTH), 2 or 1 )