API Support Forum
OEC API > API Support > Cancel Order rejected, not pending, not held
Author Topic: Cancel Order rejected, not pending, not held
(4 messages, Page 1 of 1)
Moderators: VPfau
JGagnon
Posts: 95
Joined: Apr 11, 2011


Posted: Apr 05, 2013 @ 02:49 PM             Msg. 1 of 4
We had two trades against test server where we had a placed order that we tried to Cancel and we received the following message:

Another command is in execution #202693477

Another command is in execution #202692118

In both cases the:
Order.Commands.Pending == null

and the:
Order.CurrentState == OEC.Data.OrderState.Accepted

For situations like this we repeated keep sending the Cancel Order command to OEC, is this by design?

Previously I was told by OEC developers to ensure that Order.Commands.Pending was not null and that Order.CurrentState was not in the Held state. Can someone confirm we are handling this condition properly (by continuing to resend the cancel command to OEC)?

Thanks

John Gagnon
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Apr 05, 2013 @ 02:54 PM             Msg. 2 of 4
Order was not in Held and Working status. It satisfies the previous advice to check that order in Working or Held status and Pending == null.

Victor Vins
Lead Software Developer
JGagnon
Posts: 95
Joined: Apr 11, 2011


Posted: Apr 05, 2013 @ 02:56 PM             Msg. 3 of 4
Thanks for the reply Victor, I'm still confused by your response.

Are you confirming it is o.k. to resend cancel order command when pending == null and order action == Accepted?

Or are you saying if it is in Accepted state to not resend the cancel order?

John Gagnon
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Apr 05, 2013 @ 02:57 PM             Msg. 4 of 4
It is safe to resend cancel request when order status Working or Held and Pending == null.

Victor Vins
Lead Software Developer