How to place a SL order

samant
I want to figure out which API to use for following requirement.
I want to short a NIFTY Call option say 11800CE as MIS order. Before shorting, I check its LTP. So for example, if the LTP is 100rs, I want to place a STOPLOSS BUY order for Rs 175.

I tried it with CO order. The order got placed, but was rejected with reason that "The stop loss trigger price is beyond the allowed range of 20%."
So, for this requirement, can I place 1 Market order for SHORT and 1 SL LIMIT order for long ?
  • rakeshr
    So, for this requirement, can I place 1 Market order for SHORT and 1 SL LIMIT order for long ?
    Yes, you can use the CO Market for the above order requirement.
    "The stop loss trigger price is beyond the allowed range of 20%."
    Yes, you need to define SL within the above range.
  • samant
    Thanks Rakesh, but I need to SL to be 75%. SO what's the workaround ? One I could think of is- I can place a regular SHORT order and then, every x mins, keep checking the ltp, if the ltp is > the 75% SL, I exit the position. Wanted to verify following pseudo code for this purpose. Could you please confirm ?
    if( SL Hit ){
    OrderParams orderParams = new OrderParams();
    orderParams.price = 0.0;
    orderParams.quantity = 75;
    orderParams.transactionType = Constants.TRANSACTION_TYPE_BUY;
    orderParams.orderType = Constants.ORDER_TYPE_MARKET;
    orderParams.tradingsymbol = ;
    orderParams.exchange = Constants.EXCHANGE_NFO;
    orderParams.validity = Constants.VALIDITY_DAY;
    orderParams.product = Constants.PRODUCT_MIS;
    Order order = kiteConnect.placeOrder(orderParams, Constants.VARIETY_REGULAR);

    }
  • samant
    @rakeshr : Could you please confirm the above comment ?

    Thanks
  • rakeshr
    SO what's the workaround ? One I could think of is- I can place a regular SHORT order
    Yes, you can place normal SL exit order or GTT order.
Sign In or Register to comment.