Jump to content
jclar

place trade order status 9

Recommended Posts

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

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×