API Support Forum
OEC API > Market Data > Request Tick Function
Author Topic: Request Tick Function
(4 messages, Page 1 of 1)
Moderators: VPfau
AAlario486
Posts: 11
Joined: Jan 23, 2013


Posted: Jul 15, 2013 @ 07:05 AM             Msg. 1 of 4
Please, Can You give us an example of C# or C++ code using the OEC.API function 'RequestTics.' ? We would use this function to retrieve tick by tick data of a single Market from the beginning of the day until the time of the request.
Thank you

Alessandro Alario
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jul 16, 2013 @ 10:52 AM             Msg. 2 of 4
Hello, you can find out sample code in Advanced API Example http://www.openecry.com/trading/api/documentation.cfm?ClientUpdate=0_5001_1: Tick View tab page shows how to subscribe and handle tick subscriptions

Victor Vins
Lead Software Developer
AAlario486
Posts: 11
Joined: Jan 23, 2013


Posted: Jul 17, 2013 @ 09:54 AM             Msg. 3 of 4
Please, we can't find in advanced example the code to obtain historical ticks from beginning of the day to now. Can you help us?

Alessandro Alario
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jul 17, 2013 @ 10:03 AM             Msg. 4 of 4
TickViewControl.cs has a line TickSubscription = OECClient.Global.SubscribeTicks(cbSymbol.SelectedContract, DateTime.UtcNow.AddMinutes(-10));

you need to modify to something like

OECClient.Global.SubscribeTicks(cbSymbol.SelectedContract, DateTime.Today.ToUniversalTime());

Victor Vins
Lead Software Developer