API Support Forum
OEC API > Market Data > Fundamental problems to get DAILY data (C#)
Author Topic: Fundamental problems to get DAILY data (C#)
(5 messages, Page 1 of 1)
Moderators: VPfau
SSandra
Posts: 10
Joined: Apr 28, 2010


Posted: May 07, 2010 @ 01:34 PM             Msg. 1 of 5
Hello,

I have fundamental problems to get historical data
on a daily basis (I would just need 14 - 26 data points).
I tried to understand the code in "OEC API Adv Example_2008" (C#)
but was not able to reproduce it.

Could you please put a short C# code example into this forum
which shows the basic steps (subscription, event, ...) to get
historical CLOSE prices on a daily basis for a specific future.

Many thanks in advance,
Sandra

Sandra Cestano
VictorV
Posts: 746
Joined: May 08, 2007


Posted: May 07, 2010 @ 01:48 PM             Msg. 2 of 5
Hello,

actually, such sample code in the forum will be a duplication of what we have in samples.
SSandra
Posts: 10
Joined: Apr 28, 2010


Posted: May 10, 2010 @ 09:31 AM             Msg. 3 of 5
The line below is "obsolete".
Could you please provide an example which will work

oecClient.RequestBars(c,DateTime.UtcNow - TimeSpan.FromMinutes(5 * 100),DateTime.UtcNow, TimeSpan.FromMinutes(5));

'OEC.API.OECClient.RequestBars(OEC.API.Contract, System.DateTime, System.DateTime,
System.TimeSpan)' is obsolete: 'Please use RequestBars with SubscriptionType.Bar and
interval in minutes'

Sandra Cestano
VictorV
Posts: 746
Joined: May 08, 2007


Posted: May 10, 2010 @ 10:33 AM             Msg. 4 of 5
This overloaded method is obsolete, but it is still working.
SSandra
Posts: 10
Joined: Apr 28, 2010


Posted: May 10, 2010 @ 11:22 AM             Msg. 5 of 5
Hi VictorV,
Many thanks for your reply.
Based on your infos in the threads I found a solution for my problem. The program works fine now.
Thanks,
Sandra

Sandra Cestano