API Support Forum
OEC API > API Support > Unable to get bars
Author Topic: Unable to get bars
(2 messages, Page 1 of 1)
Moderators: VPfau
RVail8713
Posts: 9
Joined: Sep 21, 2017


Posted: Oct 11, 2017 @ 12:56 PM             Msg. 1 of 2
Hi,

I am trying to get HistoricalBars for api using following method

OECClient.Global.RequestBars(cbSymbol.SelectedContract,
DateTime.UtcNow - TimeSpan.FromMinutes(interval*chart.IntervalCnt),
DateTime.UtcNow, Data.SubscriptionType.DayBar,1);

From Some symbol i am getting complete bars history while for some symbol i am getting empty array.

I am passing following parameter in that case and only getting single Bars. Can you please help me on that ? Any help would be appreciated
{ESU8}

{10-10-2017 17:52:03}

{11-10-2017 17:52:51}
CMicciche902
Posts: 367
Joined:


Posted: Oct 11, 2017 @ 01:27 PM             Msg. 2 of 2
Hi,

The further you go out on expiration may result in no data. For instance, go to: http://www.cmegroup.com/trading/equity-index/us-index/e-mini-sandp500_quotes_volume_voi.html.

If you're trying to pull up ESZ8, there are no daily bars, as no trading has occurred with this contract. The exchange website confirms this.

For ESU8, you'll see the following day bars:

Time High Low Open Close Vol
7/13/2017 17:00 2440 2435 2440 2435 3
7/18/2017 17:00 2450 2446 2450 2446 3
8/10/2017 17:00 2456 2432 2456 2432 21
8/17/2017 17:00 2458 2458 2458 2458 2
8/29/2017 17:00 2430 2430 2430 2430 4
9/12/2017 17:00 2489 2489 2489 2489 6
9/15/2017 17:00 2491.25 2491.25 2491.25 2491.25 2
9/18/2017 17:00 2502.25 2502 2502 2502.25 3
9/19/2017 17:00 2499.25 2499.25 2499.25 2499.25 6
9/22/2017 17:00 2497.5 2497.5 2497.5 2497.5 1
9/26/2017 17:00 2495 2493 2495 2493 32
9/27/2017 17:00 2499.5 2497 2497 2497 5
9/28/2017 17:00 2505.25 2505 2505 2505.25 4
9/29/2017 17:00 2513.75 2509 2509 2513.75 3
10/4/2017 17:00 2535.75 2535.75 2535.75 2535.75 2
10/5/2017 17:00 2547 2547 2547 2547 1
10/9/2017 17:00 2548 2548 2548 2548 8
10/11/2017 14:26 2549.75 2547.25 2547.25 2549.75 2
Chris M