Jump to content
Sign in to follow this  
josephtzadic

order/newstoplimitorder issue.

Recommended Posts

Hi,

I am trying to place an order but not able to getting it to work. Here below is my json. Please let me know what's the issue.

url : https://ciapi.cityindex.com/TradingAPI/order/newstoplimitorder

 

{

"OrderId":0,

"MarketId":401484392,

"MarketName":"GBP/USD",

"AutoRollover":false,

"isTrade":false,

"Direction":"buy",

"Quantity":10.0,

"BidPrice":1.431,

"OfferPrice":1.4312,

"AuditId":"XXXX",

"TradingAccountId":401651554,

"PositionMethodId":1,

"Applicability":"GTC",

"Guaranteed":false,

"TriggerPrice":1.4397

}

 

the response I am getting is as below.

 

{"Status":2,"StatusReason":75,"OrderId":0,"Orders":[{"OrderId":0,"StatusReason":8,"Status":10,"OrderTypeId":2,"Price":0.0,"Quantity":10.0,"TriggerPrice":1.4397,"CommissionCharge":0.0,"IfDone":[],"GuaranteedPremium":0.0,"OCO":null,"AssociatedOrders":{"Stop":null,"Limit":null},"Associated":false}],"Quote":null,"Actions":[],"ErrorMessage":null}
 

Share this post


Link to post

Hello,

The OrderStatus and OrderStatusReason codes in the response you received *(2nd set of Status and StatusReason fields)* 8 and 10 respectively indicates your request size is below the minimum quantity. You can view the lookup table for all the response codes at: http://docs.labs.cityindex.com/#APICodesList.htm%3FTocPath%3DGetting%20Started|Lookup%20Values|_____1

The GBP/USD spot forex market you are trying to trade has a minimum size of 1000 units, and your request is for a size of 10. Try changing the quantity to the minimum of 1000 and see if that resolves the issue.

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
Sign in to follow this  
×