Page 1 of 1

problem with historical data API

PostPosted: Wed Aug 14, 2013 2:43 pm
by jasond17
I am using the GetHistPrices C# sample with the following arguments.

EUR/USD m1 "2013-7-14 17:22" "2013-7-14 19:22" FX########## #### http://www.fxcorporate.com/Hosts.jsp Demo

I expect to receive 2 hours of bars (120) from the request, but instead it is returning me the maximum number of bars (300), that span 15:58 - 20:59, not the 120 bars I was expecting from the API.

Re: problem with historical data API

PostPosted: Thu Aug 15, 2013 12:41 am
by Valeria
Hi jasond17,

Please check the maxBars and isIncludeWeekends values in the public method
IO2GRequestFactory.createMarketDataSnapshotRequestInstrument
Please note that 2013-7-14 is a Sunday.
Also in description of IO2GRequestFactory.fillMarketDataSnapshotRequestTime is said that If timeFrom is not 0 but the chosen date rage contains more bars than the maximum number of bars, the maximum number of bars will be returned ending at the specified dateTo.