Jump to content

JoelD311

Members
  • Content count

    5
  • Joined

  • Last visited

  1. I managed to get more data by adding to my order/trade response object. I am now getting OrderReason 160 in the Orders property of the response. "Market unavailable due to local regulations or account restrictions. This is supposedly a practice API account. { "Status":2, "StatusReason":75, "OrderId":0, "ErrorMessage":null, "Orders":[ { "OrderId":0, "StatusReason":160, "Status":10, "OrderTypeId":1, "Price":0.0, "Quantity":10.0, "TriggerPrice":0.0, "CommissionCharge":0.0, "IfDone":[ ], "GuaranteedPremium":0.0 } ] }
  2. Request: {"MarketId":401166447,"Currency":null,"AutoRollover":null,"Direction":"sell","Quantity":10,"QuoteId":null,"PositionMethodId":null,"BidPrice":1.10879,"OfferPrice":1.1089,"AuditId":null,"TradingAccountId":"[Redacted]","IfDone":{"Stop":{"ExpiryDateTimeUTC":null,"Applicability":null,"ParentOrderId":null,"Associated":null,"Guaranteed":false,"OrderId":null,"TriggerPrice":null,"Quantity":10,"TrailingDistance":5.0},"Limit":null},"Close":null,"isTrade":true,"PriceTolerance":1} Response: {"Status":2,"StatusReason":75,"OrderId":0,"ErrorMessage":null} Any ideas on this?
  3. I have resolved this. I realized that my Quantity was set to 0.
  4. I am attempting to place a trade with an API enabled practice account. I am getting StatusReason 30. It doesn't make sense because I can log into the same account via web browser and place a short trade there, but not via the API. Request: {"MarketId":401166447,"Currency":null,"AutoRollover":null,"Direction":"buy","Quantity":0.0,"QuoteId":null,"PositionMethodId":null,"BidPrice":1.10894,"OfferPrice":1.10906,"AuditId":null,"TradingAccountId":"[RedactedForForumTopic]","IfDone":{"Stop":{"ExpiryDateTimeUTC":null,"Applicability":null,"ParentOrderId":null,"Associated":null,"Guaranteed":false,"OrderId":null,"TriggerPrice":1.10944,"Quantity":0.0,"TrailingDistance":null},"Limit":null},"Close":null,"isTrade":true,"PriceTolerance":1} Response: {"Status":4,"StatusReason":30,"OrderId":0,"ErrorMessage":null} Per reference, StatusReason 30 is "Cannot open a new short position as the market is currently set to Long Only." Will you please explain why this is happening?
×