API Support Forum
OEC API > API Support > OnUserStatusChanged
Author Topic: OnUserStatusChanged
(10 messages, Page 1 of 1)
Moderators: VPfau
PArnoldson
Posts: 154
Joined: Oct 03, 2007


Posted: Jul 22, 2009 @ 12:00 AM             Msg. 1 of 10
I would like to know more about this event. It never is triggered. After successfully connecting, I disconnect from the internet expecting that my online status changed, but that event didn't get fired. I would like to know how to be notified if the connection to the API is disconnected, or better would be the status of this connection through this event.

There are 10 kinds of people in the world; those who understand binary and those who don't.
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Jul 22, 2009 @ 12:00 AM             Msg. 2 of 10
This event is raised when some other user becomes online or offline - see OECClient.Users for details.

for API connection status see OnDisconnected event and OECClient.CompleteConnected property.
PArnoldson
Posts: 154
Joined: Oct 03, 2007


Posted: Jul 22, 2009 @ 12:00 AM             Msg. 3 of 10
When I recive the OnDisconnected event, which I do, I then want to attempt to reconnect after a period of time. When that happens, I call Connect again which seems to work, but I don't recive and conformation that I have or have not re-connected. What am I doing wrong?

There are 10 kinds of people in the world; those who understand binary and those who don't.
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Jul 22, 2009 @ 12:00 AM             Msg. 4 of 10
Subscribe to OnLoginComplete and OnLoginFailed events. Note that API automatically reconnects if the disconnection was unexpected (not by calling OECClient.Disconnect) and if you set AutoReconnect parameter to true when connected.
PArnoldson
Posts: 154
Joined: Oct 03, 2007


Posted: Jul 22, 2009 @ 12:00 AM             Msg. 5 of 10
When diconnection happen does the AutoReconnect have a timeout period? or after a very long time has lapsed and I get a connection the autoreconnect willl still work.

There are 10 kinds of people in the world; those who understand binary and those who don't.
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Jul 28, 2009 @ 12:00 AM             Msg. 6 of 10
API with enabled AutoReconnect tries to connect every second and does it unlimited number of times.
PArnoldson
Posts: 154
Joined: Oct 03, 2007


Posted: Sep 01, 2009 @ 03:10 PM             Msg. 7 of 10
When AutoReconnect finaly gets a connection what is the event that is notified? What is done about subscriptions that I had, Bar, tick, Quotes, etc...

There are 10 kinds of people in the world; those who understand binary and those who don't.
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Sep 01, 2009 @ 03:37 PM             Msg. 8 of 10
After a full reconnect you will get OnLoaded event.
Subscriptions are not automatically restored in this case.
PArnoldson
Posts: 154
Joined: Oct 03, 2007


Posted: Sep 01, 2009 @ 04:30 PM             Msg. 9 of 10
I am not finding this event 'OnLoaded'. When I import the dlls I get a .tlh and .tli files with all of the function from that dll and I don't have this funtion anywhere.

There are 10 kinds of people in the world; those who understand binary and those who don't.
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Sep 01, 2009 @ 04:53 PM             Msg. 10 of 10
Sorry, the correct name of the event is OnLoginComplete