Search the Community
Showing results for tags 'tradeorder'.
Found 2 results
-
decimal places exceed the maximum allowed for the market
Gez posted a topic in General Questions and Discussion
Why do I receive error: "The Quantity decimal places exceed the maximum allowed for the market." on my demo account for the below new market order attempt? Is the Quantity of 0.35 too low? Error Codes Received Status: 10 (Red Card) StatusReason: 20 The Quantity decimal places exceed the maximum allowed for the market. When I execute ... URL: /order/newtradeorder Body: { "BidPrice": 0.69041, "Direction": "Buy", "MarketId": "400617199", "OfferPrice": 0.69064, "PositionMethodId": 2, "Quantity": 0.35, "TradingAccountId": 403******, "isTrade": true } Response: { "Status": 2, "StatusReason": 75, "OrderId": 0, "Orders": [ { "OrderId": 0, "StatusReason": 20, "Status": 10, "OrderTypeId": 1, "Price": 0.0, "Quantity": 0.35, "TriggerPrice": 0.0, "CommissionCharge": 0.0, "IfDone": [], "GuaranteedPremium": 0.0, "OCO": null, "AssociatedOrders": { "Stop": null, "Limit": null }, "Associated": false } ], "Quote": null, "Actions": [], "ErrorMessage": null }- 3 replies
-
- tradeorder
- order
-
(and 6 more)
Tagged with:
-
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.
- 7 replies
-
- closing
- tradeorder
-
(and 6 more)
Tagged with: