API Support Forum
OEC API > API Support > Order.Start and Order.End Datetime feature
Author Topic: Order.Start and Order.End Datetime feature
(2 messages, Page 1 of 1)
Moderators: VPfau
JPaganini258
Posts: 16
Joined: Oct 28, 2011


Posted: Feb 15, 2012 @ 09:05 AM             Msg. 1 of 2
Hi masters,
I'm trying to send a order to a specific datetime with a specific expiration. Is the Start and End fields to put these but it cancels my order some seconds after it was in a "working" status.


I really want to know what's the best approach to work with orders in a specific time. I tried to change it to a thread, using Timer/TimerCallback class, but it throws a exceptions about lvOrders can't send orders through another threads....

So.... How can I do that?

My order ids is: #202233357 #202233360

I'm sending these orders as OCO orders.

Thanks.

Jônatas Paganini
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Feb 15, 2012 @ 09:15 AM             Msg. 2 of 2
Good morning! Your approach with Start/End time is correct, but as I can see - you are setting wrong time. Please try to use UTC time there.

About Timer/TimerCallback - it is better way to use system.windows.forms.timer with OECAPI than system.threading.timer

Victor Vins
Lead Software Developer