API Support Forum
OEC API > API Support > OnLoginComplete not fired
Author Topic: OnLoginComplete not fired
(7 messages, Page 1 of 1)
Moderators: VPfau
CZendejas116
Posts: 51
Joined: Apr 13, 2011


Posted: Jun 05, 2012 @ 09:22 AM             Msg. 1 of 7
Hi,

Sometimes, when I do OECClient.Connect(domain, port, user, pws, false), the event OECClient.OnLoginComplete() doesn't fire.
I do (in summary):

oecClient.Connect(domain, port, user, pws, false);
oecClient.Subscribe(contract);
oecClient.Unsubscribe(contract);
oecClient.Disconnect(); or OECClient_OnDisconnected(bool Unexpected) is fired //tried with both cases
oecClient.Connect(domain, port, user, pws, false);


And I get this in log (I turned on API log: OEC.Log.Start();):

07:47:09.843 Dbg Reader Order Login to OEC Server 4.1.0.0
0:47:09.849 Dbg Reader Price PLogin to OEC Server 4.1.0.0
06:47:10.341 Dbg System #8 AAlonso : Loading
06:47:14.307 Dbg System #8 AAlonso : Loaded, API: 69.0039ms, Client: 3897.2229ms
08:51:16.845 Dbg System #10 MainStream disconnected: System.Exception: app request
08:51:16.848 Dbg System #10 PriceStream disconnected: System.Exception: app request
08:51:22.607 Dbg Reader Price PLogin to OEC Server 4.1.0.0
08:51:22.607 Dbg Reader Order Login to OEC Server 4.1.0.0


Why the event OnLoginComplete() doesn't fire again?

Thanks in advance.

Claudia Zendejas
RuslanK
Posts: 69
Joined: Jun 02, 2010


Posted: Jun 05, 2012 @ 09:33 AM             Msg. 2 of 7
Hello

Please make sure you're using the latest version of API.
If this behaviour will show up again, please provide exact date and time when this happened.

Ruslan Kartokhin
Software Developer
CZendejas116
Posts: 51
Joined: Apr 13, 2011


Posted: Jun 05, 2012 @ 12:30 PM             Msg. 3 of 7
Hi,

I was using a version with modification date 10-21-2010 and now I downloaded the lasted version (I hope) from here (option "API COM (No Samples)"):
http://www.openecry.com/trading/api/documentation.cfm
this one has modification date 10-14-2011. Both of them indicates that version is 3.5.0.0

I tried same code with new version of API and I'm getting same behaviour. API log is:

11:03:28.461 Dbg Reader Price Login to OEC Server 4.1.0.0
11:03:28.461 Dbg Reader Order Login to OEC Server 4.1.0.0
11:03:28.955 Dbg System #8 AAlonso : Loading
11:03:33.319 Dbg System #8 AAlonso : Loaded, API: 77.0044ms, Client: 4287.2452ms
11:07:35.984 Dbg System #10 MainStream disconnected: System.Exception: app request
11:07:35.992 Dbg System #10 PriceStream disconnected: System.Exception: app request
11:07:38.477 Dbg Reader Order Login to OEC Server 4.1.0.0
11:07:38.480 Dbg Reader Price Login to OEC Server 4.1.0.0


I did my test at time indicated in log. I'm working in central time zone.

Regards,

Claudia Zendejas
RuslanK
Posts: 69
Joined: Jun 02, 2010


Posted: Jun 05, 2012 @ 03:34 PM             Msg. 4 of 7
I do not see anything suspicious in our server's logs.

However seems like our sample files were a little bit outdated.
We have just updated them all.
Could you please re-download them again and re-test your case?

Ruslan Kartokhin
Software Developer
CZendejas116
Posts: 51
Joined: Apr 13, 2011


Posted: Jun 05, 2012 @ 04:20 PM             Msg. 5 of 7
Hi,

I re-downloaded API (same URL) and now API has modification date 06-05-2012.
I tried same code and I have same behaviour :(

API log:

14:58:50.925 Dbg System #10 Logger level: Core (Data feed: every 1 per 00:01:00)
14:59:00.187 Dbg System #10 Logger level: Core (Data feed: every 1 per 00:01:00)
14:59:08.704 Dbg Reader Order Login to OEC Server 4.1.0.0
14:59:08.704 Dbg Reader Price Login to OEC Server 4.1.0.0
14:59:09.625 Dbg System #10 AAlonso : Loading
14:59:13.608 Dbg System #10 AAlonso : Loaded, API: 86.0049ms, Client: 3897.2229ms
15:03:16.763 Dbg System #6 MainStream disconnected: System.Exception: app request
15:03:16.771 Dbg System #6 PriceStream disconnected: System.Exception: app request
15:03:16.800 Dbg System #6 Logger level: Core (Data feed: every 1 per 00:01:00)
15:03:24.626 Dbg Reader Price Login to OEC Server 4.1.0.0
15:03:24.658 Dbg Reader Order Login to OEC Server 4.1.0.0


Any ideas?

Regards,

Claudia Zendejas
RuslanK
Posts: 69
Joined: Jun 02, 2010


Posted: Jun 06, 2012 @ 01:41 PM             Msg. 6 of 7
I will try to re-produce this behaviour in our test sample and will let you know about results.

Ruslan Kartokhin
Software Developer
CZendejas116
Posts: 51
Joined: Apr 13, 2011


Posted: Jun 20, 2012 @ 06:33 PM             Msg. 7 of 7
Hi,

My app works just fine and you always were right. Someone else changed the code and I didn't know about it, and that weird changes was causing all my problems, API works correctly.

My apologizes

Claudia Zendejas