Sudhir Tambe 1 Report post Posted September 18, 2020 Hi Team, I am trying to place limit order, and the api is giving 'Status': 4, 'StatusReason': 15 in response, and limit order is not getting executed. I am able to place trade/market order though. Below are request rseponse details. Please suggest how to place new limit order, if below approach is not correct. url: https://ciapi.cityindex.com/TradingAPI/order/newstoplimitorder Request: {'isTrade': False, 'OcoOrder': None, 'Applicability': 'GTC', 'Direction': 'sell', 'MarketId': 401203113, 'BidPrice': 0.6572907, 'OfferPrice': 0.6705693, 'Quantity': 1000, 'Reference': None, 'QuoteId': None, 'AuditId': '', 'AutoRollover': False, 'TradingAccountId': 402855859, 'TriggerPrice': None, 'PositionMethodId': 1, 'IfDone': []} Response: {'sym': 'AUDCHF', 'transType': 'sell', 'rate': 0.66393, 'qty': 1000, 'resp': {'Status': 4, 'StatusReason': 15, 'OrderId': 0, 'Orders': [], 'Quote': None, 'Actions': [], 'ErrorMessage': None}} Note: I am based in Europe. Share this post Link to post
Physicsman 25 Report post Posted September 30, 2020 Hi Sudhir, I want to clarify whether you are trying to place an entry order to open a new position should the market reach a certain price, or whether you are trying to attach a take profit limit order to an existing open position? The call you are using is to place an entry order to open a new position if the market should reach a certain price (the Trigger Price). However, in you request you have left the Trigger Price as "None". The Trigger Price is a required parameter for this call. As a note, for optional parameters that you wish to leave blank, you should send "null" and not "none". The example body for an entry order request would look something like the snippet below. Kind Regards, PM Share this post Link to post
Sudhir Tambe 1 Report post Posted September 30, 2020 Thanks for your help. triggerPrice field was missing. It worked after adding this field. 1 Physicsman reacted to this Share this post Link to post