akapur / pyiqfeed

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

BarConn returning inconsistent data type #11

Closed erickmiller closed 8 years ago

erickmiller commented 8 years ago

BarConn returning stuff as a dict In the rest of the code, including for example HistoryConn which returns historical bar data, data comes back as a numpy structured array. The benefit is that data is converted to a structured array once and then can be used to dump to hdf5 or an TSDB or used in numpy without any further data munging and you probably want to use numpy if you are doing something trading related in python anyway. Look at how QuoteConn is implemented. Much of the code is just dynamically creating the right numpy structured array type based on a request for a different list of update fields. Implementing BarConn should be dramatically simpler, more like HistoryConn, where historical requests for bar data are returned as an array of HistoryConn.bar_type. The only difference is that in HistoryConn since the request is for a specific period in the past, there is no need for a listener, the request function returns the data.

For more info see thread here: https://github.com/akapur/pyiqfeed/pull/8

erickmiller commented 8 years ago

Resolved issue in following pull request: https://github.com/akapur/pyiqfeed/pull/12