akapur / pyiqfeed

Python LIbrary for reading DTN's IQFeed
GNU General Public License v2.0
168 stars 108 forks source link

added partial data for current day in request_daily_data and current wk #22

Closed obiben closed 6 years ago

obiben commented 6 years ago

DTN says they'll roll this out... probably next year - so this may be moot.

In the meantime I'll be using the following code that tacks on the current day's data to request_daily_data and current week's weekly data to request_weekly_data.

It seems that weekly data has data from closed days in the current week, so we have to removed that prior to adding our partial weekly data.

akapur commented 6 years ago

Thanks for the PR. I'm not going to merge this for two reasons:

1) Your code is correct most of the time but not ALL the time. You need a holiday calendar to make it work ALL the time. I and others already handle this in code that is not part of pyiqfeed. It really needs to be outside pyiqfeed because you need a separate calendar for each exchange. The goal of pyiqfeed is to be a layer that talks to iqfeed. I don't want to start putting holiday calendars etc in there, though maybe I can factor out some of my code and release it separately as part of a separate library.

2) As you mentioned DTN have said they are going to handle it on their end. (Personally I'd actually rather they didn't and focused on sending what the exchange sends them over the wire because they don't always get tricky calendar stuff etc right.)