API Support Forum
OEC API > Market Data > RequestBars call receives no callback in OnBarsReceived
Author Topic: RequestBars call receives no callback in OnBarsReceived
(9 messages, Page 1 of 1)
Moderators: VPfau
CWeber984
Posts: 226
Joined: Apr 24, 2012


Posted: Aug 09, 2013 @ 04:48 PM             Msg. 1 of 9
Is there any case where if our app makes this call to the api

RequestBars(Contract, DateTime, DateTime, SubscriptionType, Int32)

that the callback to OnBarsRecieved would not occur?

I have checked that the contract exists in our local contracts list and is non-null (you've recommended this must be done first).

The first DateTime would be from the last bar we have, which might be the current bar, and the second DateTime might be that same datetime, or now, or 10 minutes in the future. The SubscriptionType is SubscriptionType_Bar, and the Int32 would be some intraday interval of minutes.

Calling RequestBars almost always produces the callback in OnBarsReceived, even if no bars are sent as part of that callback, but this fails occasionally, even if we've cleared our subscriptions and resubscribed, reobtained the contract, etc.

Note: We use the COM api.

CHW
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Aug 09, 2013 @ 05:14 PM             Msg. 2 of 9
Please send me date/time when you sent the request, username and parameters of request, I can check what happened on server side

Victor Vins
Lead Software Developer
CWeber984
Posts: 226
Joined: Apr 24, 2012


Posted: Aug 09, 2013 @ 07:16 PM             Msg. 3 of 9
Sure, that would be great. The request was sent at

GMT: Fri, 09 Aug 2013 02:36:12 GMT
Your time zone: 8/8/2013 9:36:12 PM GMT-5 (Central Time)
UNIX local timestamp: 1376015772

The contract symbol was GNGU3, and the int32 was 30.

Account: CDay4209

The account had recently been reconnected. The local contract check passed.

Thanks,

CHW
CWeber984
Posts: 226
Joined: Apr 24, 2012


Posted: Aug 29, 2013 @ 04:45 PM             Msg. 4 of 9
I have a few new instances of this behavior:

UserName: CWeber4659

Logged requests for historical bars that received no callback in OnBarsReceived:

- DEBUG 1377371121 apiOEC.cpp 9671: *RequestOECHistory GNGV3 15 min data:41509.9:41510.8 of OECAPICOM::SubscriptionType_Bar
- DEBUG 1377757568 apiOEC.cpp 9671: *RequestOECHistory GNGV3 15 min data:41509.9:41515.3 of OECAPICOM::SubscriptionType_Bar
- DEBUG 1377757624 apiOEC.cpp 9671: *RequestOECHistory GCLV3 15 min data:41509.9:41515.3 of OECAPICOM::SubscriptionType_Bar

The unix timestamp is in ET.

Could you let us know if the server records these requests being made from the given user account?

Thanks,
Chris

CHW
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Aug 29, 2013 @ 05:04 PM             Msg. 5 of 9
How to find out time here?

Victor Vins
Lead Software Developer
CWeber984
Posts: 226
Joined: Apr 24, 2012


Posted: Aug 29, 2013 @ 08:57 PM             Msg. 6 of 9
Excuse me, the unix timestamp is to unix epoch time (GMT). Thanks!

CHW
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Aug 30, 2013 @ 08:09 AM             Msg. 7 of 9
Could you please convert it to readable format?

Victor Vins
Lead Software Developer
CWeber984
Posts: 226
Joined: Apr 24, 2012


Posted: Sep 09, 2013 @ 11:49 AM             Msg. 8 of 9
I use http://www.epochconverter.com/ to get unix timestamps from GMT cast to my time zone. For Chicago's current time zone (CDT), the above unix timestamps need the -5 hour offset. the results are:

1377371121 -> Aug 24 2013 14:05:21
1377757568 -> Aug 29 2013 01:26:08
1377757568 -> Aug 29 2013 01:27:04

CHW
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Sep 09, 2013 @ 12:22 PM             Msg. 9 of 9
Our logs show this user had experienced network issues between 23:47:30 on Aug 28 and 01:25:42.894 on Aug 29: there was a couple reconnections in data stream connections due network issues and one irregular reconnection of trading connection.

We don't have detailed logs for Aug 24 anymore.

Victor Vins
Lead Software Developer