Jump to content

Search the Community

Showing results for tags 'web min size'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Gain Capital API FAQ
    • General Questions and Discussion

Found 1 result

  1. 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.
×