API Support Forum
OEC API > API Support > Cancel Order failed error message
Author Topic: Cancel Order failed error message
(6 messages, Page 1 of 1)
Moderators: VPfau
JGagnon
Posts: 95
Joined: Apr 11, 2011


Posted: Feb 21, 2013 @ 01:25 AM             Msg. 1 of 6
Could someone explain what this error means and how we should handle it?

Should we just attempt another trade cancellation?

Another command is in execution #202648100

This happened when we attempted to cancel a working order, the order ended up getting filled and we had to manually close it out later.

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


Posted: Feb 21, 2013 @ 09:04 AM             Msg. 2 of 6
Hello,

generally, this error means that our server received a new command for an order that has in processing previous one. In your case, our simulation engine in API environment was very slow and processed the original order request during a minute. We are researching the reason of this slowdown.

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


Posted: Feb 21, 2013 @ 01:07 PM             Msg. 3 of 6
Thanks Victor, I'll adjust our code to resend the cancellation request. My only concern is if we repeatedly get this message, as you noted the trade did not fill until a minute later. So possibly a bug on the OEC side or do you think this is specific to the simulation engine and should not be a concern in production?

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


Posted: Feb 21, 2013 @ 01:15 PM             Msg. 4 of 6
John, this issue with slowdown execution is definitely limited to a simulation engine in this environment. But similar issues, not exactly this one, are possible in production too in the case of disasters or outages on our or exchange side. So, it is good idea to be prepared in production code.

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


Posted: Feb 22, 2013 @ 10:59 AM             Msg. 5 of 6
Still trying to understand how we should handle this.

We send an order that is waiting to be filled.

We attempt to cancel the order and get this error message.

What do we do next?

Please see OECId: 202660204

I put in code to try to cancel the order again when we get this message, it ended up trying to send over 80 cancel order requests because we kept getting this error message.

Please advise.

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


Posted: Feb 22, 2013 @ 11:33 AM             Msg. 6 of 6
I would check that order is in Working or Held status and Order.Commands.Pending == null before sending a cancel or modify request.

Victor Vins
Lead Software Developer