Hey guys,
Super happy to see the developments of the history function. It's making some of the tedious work really easy and quick.
While playing with it I noticed a few things:
1. I tried having a global variable, BARS = 10 , to pass to history
BARS = 10
history(bar_count=BARS, ...... )
It gives an error 'bar_count must be an int'.
2. I have the following code to get the prices:
price_history = history(bar_count=10, frequency='1m', field='price')
for s in data:
price = price_history[s]
print price
This returns:
PRINT2014-09-19 19:52:00+00:00 7.605
2014-09-19 19:53:00+00:00 7.600
2014-09-19 19:54:00+00:00 7.600
2014-09-19 19:55:00+00:00 7.609
2014-09-19 19:56:00+00:00 7.610
2014-09-19 19:57:00+00:00 7.605
2014-09-19 19:58:00+00:00 7.610
2014-09-19 19:59:00+00:00 7.605
2014-09-19 20:00:00+00:00 7.610
2014-09-22 13:31:00+00:00 7.590
Name: 33026, dtype: float64
The last price value seems to have an older time stamp. I've noticed this on all the fields, not just the price field.
Again, maybe I'm just messing something up, but yeah. There it is