API Support Forum
OEC API > API Support > Refresh Orders
Author Topic: Refresh Orders
(4 messages, Page 1 of 1)
Moderators: VPfau
eo707
Posts: 68
Joined: Nov 08, 2011


Posted: Mar 09, 2012 @ 03:18 AM             Msg. 1 of 4
When you are connected and the market is closed for that day...
For example TF (RLM-M), is closed at 11PM UTC...
Let's say that you are still connected for two hours, then the next day, the OECClient.Orders
http://www.openecry.com/api/api/OEC.API.OECClientMembers.html
http://www.openecry.com/api/api/OEC.API.OECClient.Orders.html

technically should be empty, but it is not....
The daily position should be 0, but it is not.
http://www.openecry.com/api/api/OEC.API.Account.TotalBalance.html

There is a way to refresh the account??? without logout and login again?

Thank you.
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Mar 09, 2012 @ 08:20 AM             Msg. 2 of 4
You need to reconnect to cleanup completed, cancelled and rejected orders from closed trading sessions.

Victor Vins
Lead Software Developer
eo707
Posts: 68
Joined: Nov 08, 2011


Posted: Mar 09, 2012 @ 09:03 AM             Msg. 3 of 4
Dose the reconnect must be after the beginning of the next day, right?

Can you confirm?

If I will reconnect before 12 AM UTC, then it will not be empty...
please clarify.
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Mar 09, 2012 @ 09:15 AM             Msg. 4 of 4
Reconnect should be done after this time: http://www.openecry.com/api/api/OEC.API.BaseContract.StopTime.html + 10 minutes

Victor Vins
Lead Software Developer