conn.setRequestProperty("trigger_price","XYZ.XY"); conn.setRequestProperty("squareoff_value","XYZ.XY"); //Bracket Order (BO) conn.setRequestProperty("stoploss_value","XYZ.XY");//Bracket Order (BO)
Can anyone help me with place order,login user code ?
It looks correct, but you are placing a regular order, so the BO parameters won't work. If you want to place a BO, the request has to be POSTed to /orders/bo
is following code correct for place BO order, and how to place SL-M order URL url = new URL("https://api.kite.trade/orders/bo"); HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setDoInput(true); conn.setRequestProperty("api_key", "APIKEY"); conn.setRequestProperty("access_token", "AccessToken"); conn.setRequestProperty("tradingsymbol", "ABC"); conn.setRequestProperty("exchange","NSE"); conn.setRequestProperty("transaction_type","BUY"); conn.setRequestProperty("quantity","1"); conn.setRequestProperty("product","MIS"); conn.setRequestProperty("validity","DAY");
conn.setRequestProperty("trigger_price","XYZ.XY"); conn.setRequestProperty("squareoff_value","XYZ.XY"); //Bracket Order (BO) conn.setRequestProperty("stoploss_value","XYZ.XY");//Bracket Order (BO)
URL url = new URL("https://api.kite.trade/orders/bo");
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setDoInput(true);
conn.setRequestProperty("api_key", "APIKEY");
conn.setRequestProperty("access_token", "AccessToken");
conn.setRequestProperty("tradingsymbol", "ABC");
conn.setRequestProperty("exchange","NSE");
conn.setRequestProperty("transaction_type","BUY");
conn.setRequestProperty("quantity","1");
conn.setRequestProperty("product","MIS");
conn.setRequestProperty("validity","DAY");
conn.setRequestProperty("trigger_price","XYZ.XY");
conn.setRequestProperty("squareoff_value","XYZ.XY"); //Bracket Order (BO)
conn.setRequestProperty("stoploss_value","XYZ.XY");//Bracket Order (BO)