Use product as MIS for intraday and CNC(EQ) or NRML(FNO) for delivery. And checkout placeorder method in Examples class, it is stoploss intraday example.
@Kailash can you elaborate on what you mean by "check it against holdings/positions before you fire the order."
Does this mean, If I have BUY-MIS order in COMPLETE state, the next SELL-MIS order is treated as opposite SELL order automatically, otherwise will treated as short sell.
2. Yes, you can do using modifyProduct method in the same Examples class.
i can not find anything from example.
Please let me know how to sell an MIS intra-day order,
Question#2
Thanks, this is a relief
And checkout placeorder method in Examples class, it is stoploss intraday example.
Does this mean,
If I have BUY-MIS order in COMPLETE state, the
next SELL-MIS order is treated as opposite SELL order automatically, otherwise will treated as short sell.
is my understanding correct ?
But getting an error while placing a SELL order after my BUY/MIS is successful.
"Invalid order_type"
the params i used are
LMT/BUY/DAY for buy
LMT/SELL/DAY for sell
Can you let me know what is going wrong ?
//buy order
Map params = new HashMap() {
{
put("quantity", String.valueOf(tradeInput.per_order_quantity));
put("order_type", "LIMIT");
put("tradingsymbol", tradeInput.symbol);
put("product", tradeInput.product);
put("exchange", "NSE");
put("transaction_type", "BUY");
put("validity", "DAY");
put("price", String.valueOf(buy_price));
}
};
Order buyOrder = kite.placeOrder(params, "regular");
//sell order code
Map params = new HashMap() {
{
put("quantity", String.valueOf(tradeInput.per_order_quantity));
put("order_type", "LMT");
put("tradingsymbol", tradeInput.symbol);
put("product", tradeInput.product);
put("exchange", "NSE");
put("transaction_type", "SELL");
put("validity", "DAY");
put("price", String.valueOf(sell_price));
}
};
Order sellOrder = kite.placeOrder(params, "regular");
In both cases product is MIS and symbol is GMRINFRA