oanda / oandapy

Python wrapper for the OANDA REST API
MIT License
324 stars 148 forks source link

missing candlesticks... #18

Closed sirvon closed 9 years ago

sirvon commented 9 years ago

Here's a call i'm making to the api:

        missingCandlesticks = oanda.get_history(instrument=currency_pair, \ 
                 granularity=time_compression,start=lastSavedCandlestickTimestamp, \
                 end=rightNow,candleFormat="midpoint", \
                alignmentTimezone="America/New_York")

this is returning everything cool, but it's always missing candles no matter what granularity I use.. below is the returned timestamps from a recent api call, as you see it's missing quite a fix candles, what gives?

'2015-07-30T21:20:00.000000Z'
'2015-07-30T21:23:00.000000Z'
'2015-07-30T21:25:00.000000Z'
'2015-07-30T21:26:00.000000Z'
'2015-07-30T21:27:00.000000Z'
'2015-07-30T21:28:00.000000Z'
'2015-07-30T21:29:00.000000Z'
'2015-07-30T21:30:00.000000Z'
'2015-07-30T21:33:00.000000Z'
'2015-07-30T21:34:00.000000Z'
'2015-07-30T21:35:00.000000Z'
'2015-07-30T21:36:00.000000Z'
'2015-07-30T21:39:00.000000Z'
'2015-07-30T21:40:00.000000Z'
'2015-07-30T21:41:00.000000Z'
'2015-07-30T21:42:00.000000Z'
'2015-07-30T21:43:00.000000Z'
'2015-07-30T21:44:00.000000Z'
'2015-07-30T21:45:00.000000Z'
'2015-07-30T21:47:00.000000Z'
'2015-07-30T21:48:00.000000Z'
'2015-07-30T21:49:00.000000Z'
'2015-07-30T21:50:00.000000Z'
'2015-07-30T21:51:00.000000Z'
'2015-07-30T21:52:00.000000Z'
'2015-07-30T21:53:00.000000Z'
'2015-07-30T21:55:00.000000Z'
'2015-07-30T21:56:00.000000Z'
'2015-07-30T21:57:00.000000Z'
'2015-07-30T21:58:00.000000Z'
'2015-07-30T22:00:00.000000Z'
'2015-07-30T22:01:00.000000Z'
'2015-07-30T22:02:00.000000Z'
'2015-07-30T22:03:00.000000Z'
'2015-07-30T22:04:00.000000Z'
'2015-07-30T22:06:00.000000Z'
'2015-07-30T22:07:00.000000Z'
'2015-07-30T22:08:00.000000Z'
'2015-07-30T22:09:00.000000Z'
'2015-07-30T22:10:00.000000Z'
'2015-07-30T22:11:00.000000Z'
'2015-07-30T22:12:00.000000Z'
'2015-07-30T22:13:00.000000Z'
'2015-07-30T22:14:00.000000Z'
'2015-07-30T22:15:00.000000Z'
'2015-07-30T22:16:00.000000Z'
'2015-07-30T22:17:00.000000Z'
'2015-07-30T22:18:00.000000Z'
'2015-07-30T22:19:00.000000Z'
ayfchan commented 9 years ago

Hello,

Candles are not generated for period when there are no ticks. As such, you will notice "gaps" with the candle history.