API Support Forum
OEC API > API Support > Can't get streaming quotes on reconnect
Author Topic: Can't get streaming quotes on reconnect
(4 messages, Page 1 of 1)
Moderators: VPfau
PFranchetti
Posts: 17
Joined: Sep 26, 2012


Posted: Feb 22, 2013 @ 05:30 AM             Msg. 1 of 4
I connect to OEC server using AutoReconnect=True, then ask for market data which arrives normally. When connection is broken for an external reason (e.g. ADSL goes down), API correctly reconnects automatically when connection is re-established.But then there is no way to get market data.
I tried to call again Subscribe method, I tried to Unsubscribe then Subscribe, but quotes remain frozen.

Paolo Franchetti
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Feb 22, 2013 @ 08:13 AM             Msg. 2 of 4
Hello, please send me your username and approximate time of the issue - we will take a look

Victor Vins
Lead Software Developer
PFranchetti
Posts: 17
Joined: Sep 26, 2012


Posted: Feb 22, 2013 @ 10:59 AM             Msg. 3 of 4
Login:PFranchetti654,today I made a lot of experiments,anyway it happens ALL the times.
After some investigation I can give you some hints.
Initially, I get contracts (let's focus on FTSEH3 and FDAXH3) through SymbolLookup. Then I store into my program the Contract objects I get.
When OEC disconnects and reconnects, the Contract objects I stored for FTSEH3 and FDAXH3 are perfectly valid and working (properties and methods work fine) BUT they are not present anymore in OECClient.Contracts list. I believe this could be the reason why OECClient.Subscribe on these Contract objects silently fails.
Thanks and regards

Paolo Franchetti
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Feb 22, 2013 @ 11:30 AM             Msg. 4 of 4
Thank you for details, it is helpful. Your application should perform symbol lookup again after login to make sure the contract is inside local collection before subscribing for quotes

Victor Vins
Lead Software Developer