API Support Forum
OEC API > Market Data > RequestBars question
Author Topic: RequestBars question
(7 messages, Page 1 of 1)
Moderators: VPfau
WBuchanan28
Posts: 7
Joined: Aug 05, 2007


Posted: Dec 03, 2007 @ 04:13 PM             Msg. 1 of 7
I'm trying to retrieve data on a one minute interval. I've requested Nov 1st-Dec 3rd and I receive 1440 bars that begin on Nov 26th and end on Nov 28th. The arguments that go into RequestBars are

RequestBars(Contract, 11/1/2007, 12/3/2007, 0:01);

The contract is the ES (Mar or Dec expiration)

Bill Buchanan
RightEdge Systems, LLC
http://www.rightedgesystems.com
WBuchanan28
Posts: 7
Joined: Aug 05, 2007


Posted: Dec 03, 2007 @ 04:17 PM             Msg. 2 of 7
Never mind, I've figured out the problem.

Bill Buchanan
RightEdge Systems, LLC
http://www.rightedgesystems.com
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Dec 03, 2007 @ 04:31 PM             Msg. 3 of 7
Maximum number of available bars is limited, and number of bars per response is limited too.

for your case, you should get data for 10 calendar days from today- i.e. up to Nov 24th (note Nov 24th and 25th are Saturday and Sunday). Also data will come in several responses, by 1440 pars each - so you probably did not handle all responses but first.
WBuchanan28
Posts: 7
Joined: Aug 05, 2007


Posted: Dec 03, 2007 @ 04:37 PM             Msg. 4 of 7
Yes, that's exactly what it is. What's the event to determine that the transmission of historical data is complete?

Bill Buchanan
RightEdge Systems, LLC
http://www.rightedgesystems.com
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Dec 03, 2007 @ 04:43 PM             Msg. 5 of 7
Sorry, but there are no such event. Currently there is no guaranteed way to tell how many responses will be received and what order they will have.
Also, if you will use SubscribeBars instead of RequestBars, you will get similar OnBarsReceived every time the most current bar is updated (with updated bar only).
WBuchanan28
Posts: 7
Joined: Aug 05, 2007


Posted: Dec 03, 2007 @ 05:02 PM             Msg. 6 of 7
OK, so that makes requesting a block of bars in a synchronous type fashion impossible, correct?

Bill Buchanan
RightEdge Systems, LLC
http://www.rightedgesystems.com
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Dec 03, 2007 @ 05:05 PM             Msg. 7 of 7
yes, that is correct.