Author |
Topic: RequestBars two OnBarsReceived events (6 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
LCarter2 Posts: 20 Joined: Jun 13, 2013 |
I have noticed with the RequestBars method, there appear to be 2 calls to the OnBarsReceived event. This first call has data and the second does not have any data.
Is this expected? Leigh Carter |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
Empty packet is a indicator of the end of historical loading. After that all incoming packets are real-time ones (if you subscribed to real-time updates)
Victor Vins Lead Software Developer |
||||
LCarter2 Posts: 20 Joined: Jun 13, 2013 |
How do I make sure that I am not subscribed to realtime updates?
Does this affect the Level 1 and Level 2 data if I am not subscribed? Leigh Carter |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
I meant bar subscription. So, you can request just historical bars (http://www.openecry.com/api/api/html/Overload_OEC_API_OECClient_RequestBars.htm) or request historical bars and real-time updates (http://www.openecry.com/api/api/html/Overload_OEC_API_OECClient_SubscribeBars.htm). These calls do not affect Level 1 and 2 subscriptions.
Victor Vins Lead Software Developer |
||||
LCarter2 Posts: 20 Joined: Jun 13, 2013 |
OK, I am still not getting it.
I have not made any calls to SubscribeBars. From the API I don't see any way to specify realtime updates. Am I missing something obvious here? Leigh Carter |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
So, if you didn't call SubscribeBars, empty packet is just an indication of the end of historical loading without real-time updates after that.
Victor Vins Lead Software Developer |
||||