API Support Forum
OEC API > API Support > Rules for cancelling an order.
Author Topic: Rules for cancelling an order.
(2 messages, Page 1 of 1)
Moderators: VPfau
JJohn76
Posts: 6
Joined: Aug 19, 2009


Posted: Oct 27, 2009 @ 11:38 AM             Msg. 1 of 2
What state does an order have to be in before it can be cancelled?

In Acct DEMO152194, our program entered order 36852322 at 9:00:00.548 (Buy 5 NQZ9 STP 1747.50). OnOrderConfirmed fired, OnOrderStateChanged fired indicating the order is in the SENT state. Then our program tried to cancel the order and it failed ("Order does not exist at 9:00:00.892"). Then OnOrderStateChanged fired indicating the order is in the WORKING state.

Does the order need to be in the HELD or WORKING state before it can be cancelled?

Regards,
John

John Gronemus
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Oct 27, 2009 @ 04:22 PM             Msg. 2 of 2
Yes, you are correct - SENT orders could not be cancelled. only HELD and WORKING orders could be.