Jump to content

wertmandu

Members
  • Content count

    8
  • Joined

  • Last visited

  • Days Won

    1
  1. Order Status Reason 81

    I have looked over it and have concluded that I am getting the right quantity size for the call, however now I am noticing a new response like so: {"Status":4,"Quote":null,"Orders":[],"Actions":[],"StatusReason":61,"OrderId":0,"ErrorMessage":null} and dock.labs.gaincapital.com is down, do you know what that one particularly means?
  2. Order Status Reason 81

    I will check to see the code is in fact grabbing the quantity correctly, however I believe that I have not made any changes in that respect for creating the json to send. On the other hand I have only just recently began testing with quantities larger than 1000. I will report back if it is an error with my code attempting to send incorrect information.
  3. Order Status Reason 81

    After finding a post from 2019 with user OldWiseAndExperienced, I see that it might have an issue with Quantity, but as I said before I have had success opening and closing trades when it was just 1000 lots. Now I am experimenting with larger quantities between 2000 ~ 3000 + and now I am running into this error. Can anyone provide more information? Here is another example call from Postman that sometimes returns a valid trade close and other times gives me an 81: Position below Web Min Size. "MarketId": 401449252, "MarketName": "GBP/USD", "Direction": "buy", "BidPrice": 1.35646, "OfferPrice": 1.35677, "OrderId": 773976947, "Quantity": 2461, "TradingAccountId": *****, "isTrade": true, "PositionMethodId": 1, "Close": [773976947] I am running out of ideas. If anyone knows anything please let me know.
  4. Hello I have been running into the following json response when my program is attempting to close a position: {"Status":2,"Quote":null,"Orders":[{"Status":10,"CommissionCharge":0,"Associated":false,"StatusReason":81,"AssociatedOrders":{"Stop":null,"Limit":null},"Quantity":0,"OrderId":0,"TriggerPrice":0,"GuaranteedPremium":0,"IfDone":[],"Price":0,"OrderTypeId":1,"OCO":null}],"Actions":[],"StatusReason":75,"OrderId":0,"ErrorMessage":null} So far I have gathered that it means something with Web Min Size. My question is what is Web Min Size? My call on my java backend looks like this: String TradeBaseUrl = "https://ciapi.cityindex.com/TradingAPI/order/newtradeorder/"; CloseableHttpClient httpclient = HttpClients.createDefault(); HttpPost postRequest = new HttpPost(TradeBaseUrl + "?UserName=" + username + "&Session=" + session); String direction; if(tradeType.contentEquals("BULL")) direction = "sell"; else if(tradeType.contentEquals("BEAR")) direction = "buy"; else direction = "Not Determined"; String jsonBody = "{" + "\"MarketID\": " + marketID + ", " + "\"Direction\": \""+direction+"\", " + "\"BidPrice\": " + bidPrice + ", " + "\"OfferPrice\": " + offerPrice + ", " + "\"Quantity\": " + quantity + ", " + "\"OrderID\": "+openingID+", " + "\"positionMethodId\": 1, " + "\"TradingAccountId\": " + tradingAccountID + ", " + "\"MarketName\": \"" + marketName + "\", " + "\"isTrade\": true" + "}"; I only started to get these errors when I started testing with quantities greater than 1000.
×