Jump to content

Anders

Members
  • Content count

    1
  • Joined

  • Last visited

  1. Hi, After reading this good education material on order types (https://www.forex.com/en/education/education-themes/managing-risk/introduction-to-order-types/), I wanted to try out creating a "stop entry buy order" to see how that would look using the API. I tried out the /order/newstoplimitorder end point (assuming that was the correct one in this case), using this JSON: { "Direction": "buy", "MarketId": EUR-USD-market-id-here, "Quantity": 1000, "TradingAccountId": trading-account-id-here, "TriggerPrice": 1.1829, "BidPrice": 1.184, "OfferPrice": 1.185 } where at the time I did the testing all the three prices were above the current spread. On all my attempts it failed with: {'Status': 2, 'StatusReason': 75, 'OrderId': 0, 'Orders': [{'OrderId': 0, 'StatusReason': 49, 'Status': 10, 'OrderTypeId': 3, 'Price': 0.0, 'Quantity': 1000.0, 'TriggerPrice': 1.1829, 'CommissionCharge': 0.0, 'IfDone': [], 'GuaranteedPremium': 0.0, 'OCO': null, 'AssociatedOrders': {'Stop': null, 'Limit': null}, 'Associated': false}], 'Quote': null, 'Actions': [], 'ErrorMessage': null} Apparently I'm doing it wrong. How should a stop entry order (i.e. "an order that triggers a market order when a predefined rate is reached") be created using the API? Thanks for all input. 🙏
×