jclar 0 Report post Posted September 19, 2018 Hi, I did place a trade order, but it returns: Status 9, reason 1 A valid operationId with 0 as executed amount. The transaction is not being shown in my account movement. Any explanation?. Thanks in advance for your support. Share this post Link to post
Physicsman 26 Report post Posted September 20, 2018 Hi, An OrderStatus code if 9 means your position is Closed. The market where you were attempting to place your trade, did you already have an open position in the opposite direction? Purely from the returned OrderStatus code it appears you have closed a position. You can find the lookups for codes from the following page: http://docs.labs.cityindex.com/#APICodesList.htm%3FTocPath%3DGetting%20Started|Lookup%20Values|_____1 If you are still having issues, please detail what you are trying to do and the calls you are sending with relevant code snippets, JSON data payloads etc. and I can look into it further. Kind Regards, PM Share this post Link to post
jclar 0 Report post Posted September 20, 2018 Hi, thanks for the comment. Indeed, the trade order was closing several open positions.My doubt was trigger by the fact that the executed amount returned was zero. In our trading program we will need to assume that if: after placing a trade order we get an OrderId,with status is 9 and the executed amount equals zero, then executed amount = trade order amount. Do you agree? Cheers, you have been very helpful Share this post Link to post
Physicsman 26 Report post Posted September 20, 2018 Hi, I would check the InstructionStatus, and InstructionStatusReason codes in addition to the OrderStatus and OrderStatusReason codes. Pasted below is the response from a closing trade I just executed. You can see the InstructionStatus and InstructionStatusReason codes of 1 ; 1 plus the 9 ; 1 for the OrderStatus and OrderStatusReason. Since 1 ; 1 represents Accepted ; OK that provides more confirmation that the trade was closed successfully. {"Status":1,"StatusReason":1,"OrderId":650587368,"Orders":[{"OrderId":650587368,"StatusReason":1,"Status":9,"OrderTypeId":1,"Price":1.17429,"Quantity":0.0,"TriggerPrice":0.0,"CommissionCharge":0.0,"IfDone":[],"GuaranteedPremium":0.0,"OCO":null,"AssociatedOrders":{"Stop":null,"Limit":null},"Associated":false}],"Quote":null,"Actions":[{"ActionedOrderId":650587192,"ActioningOrderId":0,"Quantity":1.0,"ProfitAndLoss":-1.0,"ProfitAndLossCurrency":"GBP","OrderActionTypeId":2}],"ErrorMessage":null} Kind Regards, PM Share this post Link to post
jclar 0 Report post Posted September 20, 2018 Thks !!, I got it, "StatusReason was to be check all the time. Share this post Link to post