API Support Forum
OEC API > API Support > Sometime new order are sent and Canceled immidiatly by server.
Author Topic: Sometime new order are sent and Canceled immidiatly by server.
(4 messages, Page 1 of 1)
Moderators: VPfau
AAnatoly
Posts: 22
Joined: Jul 01, 2010


Posted: Sep 01, 2010 @ 07:22 AM             Msg. 1 of 4
Reproduced with 'Advanced Example'

If order is rejected than we look for Reason filed.
Why order is Canceled and how to know the reason to show in application?

Here is log for example with an issue:

14:14:58.773 : State of Order #201212740 (Sell 100 ZCU0 MKT) changed from Sent to Cancelled
14:14:58.648 : Command #201212740 Create for Order #201212740 (Sell 100 ZCU0 MKT) updated
14:14:58.523 : State of Order #201212740 (Sell 100 ZCU0 MKT) changed from Sent to Sent
14:14:58.413 : Order #-4 (Sell 100 ZCU0 MKT) confirmed. New Order #201212740

Here is good flow:

14:14:58.101 : State of Order #-4 (Sell 100 ZCU0 MKT) changed from Unknown to Sent
14:14:53.492 : Order #201212739 (Sell 100 ZCU0 MKT) filled : 10@4.2675
14:14:53.398 : Order #201212739 (Sell 100 ZCU0 MKT) filled : 8@4.2700
14:14:53.273 : Order #201212739 (Sell 100 ZCU0 MKT) filled : 21@4.2725
14:14:53.163 : Order #201212739 (Sell 100 ZCU0 MKT) filled : 5@4.2775
14:14:53.070 : Order #201212739 (Sell 100 ZCU0 MKT) filled : 56@4.2850
14:14:52.945 : State of Order #201212739 (Sell 100 ZCU0 MKT) changed from Sent to Completed
14:14:52.835 : Command #201212739 Create for Order #201212739 (Sell 100 ZCU0 MKT) updated
14:14:52.710 : State of Order #201212739 (Sell 100 ZCU0 MKT) changed from Sent to Sent
14:14:52.601 : Order #-3 (Sell 100 ZCU0 MKT) confirmed. New Order #201212739

Regards,
Anatoly



Anatoly Gutnick
Edited by AAnatoly on Sep 1, 2010 at 07:23:10
Edited by AAnatoly on Sep 1, 2010 at 07:32:31
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Sep 01, 2010 @ 08:24 AM             Msg. 2 of 4
OEC sends market orders to CBOT with FOK flag

Victor Vins
Software Developer
AAnatoly
Posts: 22
Joined: Jul 01, 2010


Posted: Sep 01, 2010 @ 08:27 AM             Msg. 3 of 4
How to retrieve reaon for cancel?

Anatoly Gutnick
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Sep 01, 2010 @ 08:34 AM             Msg. 4 of 4
There are only two reasons: cancelled by user or by exchange. So, if there is no successfully executed cancel request, the order was cancelled by exchange.

Victor Vins
Software Developer