Hi @hhemanth, Once you place BO, only one order is placed which is limit(first leg), once first leg is executed then other two are placed. So when you place BO and fetch orderbook, it will have only one order entry.
I want to place a bracket order with Limit price as 277, Target as 280 and trailing stop loss as Rs 1 how do i place it? can you post the parameters for it?
I want to place a bracket order with Limit price as 277, Target as 280 and trailing stop loss as Rs 1 how do i place it? can you post the parameters for it?
This is the example params for your query same as Nikhil's answer. For bracket order, squareoff_value, stoploss_value are compulsory and you will specify these values in points, i.e difference between LTP and desired price. Square off value, stoploss and trailing stoploss are always specified in points, not in price. Note: minimum value for trailing stoploss is 1.
@sujith I tried exactly the params specified by you, but this is going as a MIS order and not as a BO. I tried with product with "BO". I tried product = "MIS" and variety = "BO" its just not working. Can you please tell me if BO is even supported. Can you verify it yourself and then give the parameters please. We have tried it for 3 days , please help us.
@sujith This is the first order placed as per your reply. I cant see a BO order it is going as a MIS order .(trailing Stop loss 1 , stoploss 2 and sq off 3)
09:30:28 SBIN NSE BUY 1 / 1 277.5 MIS
If we change it to BO
09:29:39 SBIN NSE SELL 1 / 1 277.55 BO COMPLETE 09:29:39 SBIN NSE BUY 1 / 1 277.6 BO COMPLETE
Hi, Product can be only MIS or CNC for equity and MIS or NRML for F&O contracts. Kite considers MIS as intraday and CNC as delivery. BO is a order variety not product. All BO are MIS which means it will be squared off by 3:20 PM. Order variety can be REGULAR, BO, CO and AMO(after market order).
Once you place BO, only one order is placed which is limit(first leg), once first leg is executed then other two are placed. So when you place BO and fetch orderbook, it will have only one order entry.
Map param = new HashMap(){
{
put("quantity", "1");
put("order_type", "LIMIT");
put("price", "1.4");
put("transaction_type", "BUY");
put("tradingsymbol", "ANKITMETAL");
put("trailing_stoploss", "1");
put("stoploss_value", "1");
put("exchange", "NSE");
put("validity", "DAY");
put("squareoff_value", "1");
put("product", "MIS");
}
};
Lets say SBIN is trading at 277
I want to place a bracket order with Limit price as 277, Target as 280 and trailing stop loss as Rs 1
how do i place it? can you post the parameters for it?
Thank you
{
put("quantity", "1");
put("order_type", "LIMIT");
put("price", "277");
put("transaction_type", "BUY");
put("tradingsymbol", "SBIN");
put("trailing_stoploss", "1");
put("stoploss_value", "2");
put("exchange", "NSE");
put("validity", "DAY");
put("squareoff_value", "3");
put("product", "MIS");
}
};
In the example above, I've assumed the stoploss is at 275, since stoploss value is mandatory.
Lets say SBIN is trading at 277
I want to place a bracket order with Limit price as 277, Target as 280 and trailing stop loss as Rs 1
how do i place it? can you post the parameters for it?
Thank you
{
put("quantity", "1");
put("order_type", "LIMIT");
put("price", "277");
put("transaction_type", "BUY");
put("tradingsymbol", "SBIN");
put("trailing_stoploss", "1");
put("stoploss_value", "2");
put("exchange", "NSE");
put("validity", "DAY");
put("squareoff_value", "3");
put("product", "MIS");
}
};
This is the example params for your query same as Nikhil's answer.
For bracket order, squareoff_value, stoploss_value are compulsory and you will specify these values in points, i.e difference between LTP and desired price.
Square off value, stoploss and trailing stoploss are always specified in points, not in price.
Note: minimum value for trailing stoploss is 1.
This is the first order placed as per your reply. I cant see a BO order it is going as a MIS order .(trailing Stop loss 1 , stoploss 2 and sq off 3)
09:30:28 SBIN NSE BUY 1 / 1 277.5 MIS
If we change it to BO
09:29:39 SBIN NSE SELL 1 / 1 277.55 BO COMPLETE
09:29:39 SBIN NSE BUY 1 / 1 277.6 BO COMPLETE
I guess something is off
Product can be only MIS or CNC for equity and MIS or NRML for F&O contracts. Kite considers MIS as intraday and CNC as delivery. BO is a order variety not product. All BO are MIS which means it will be squared off by 3:20 PM. Order variety can be REGULAR, BO, CO and AMO(after market order).
I will try for SBIN and let you know.
Map param10 = new HashMap(){
{
put("quantity", "1");
put("order_type", "LIMIT");
put("price", "276.8");
put("transaction_type", "BUY");
put("tradingsymbol", "SBIN");
put("trailing_stoploss", "1");
put("stoploss_value", "2");
put("exchange", "NSE");
put("validity", "DAY");
put("squareoff_value", "3");
put("product", "MIS");
}
};
Order order10 = kiteconnect.placeOrder(param10, "bo");
System.out.println(order10.orderId);