Update Trigger Price

Amitesh
Hi,

I need some help on how to modify SL order of type CO. Please check the data and let me know what is the issue

Scenario: I placed a CO Market type BUY Order for ONGC with quantity 4 and order price 100.0 and SL 98.0
Now I have a running SL order with Parent and Child Order ID are ParentOrderID:181019001234567 and OrderID:181019001234569 respectively.
I want to update the SL price to 98.50 and below is my settings

OrderParams orderParams = new OrderParams();
orderParams.quantity = 4;
orderParams.orderType = Constants.ORDER_TYPE_SLM;
orderParams.tradingsymbol = "ONGC";
orderParams.product = Constants.PRODUCT_MIS;
orderParams.exchange = Constants.EXCHANGE_NSE;
orderParams.transactionType = Constants.TRANSACTION_TYPE_SELL;
orderParams.validity = Constants.VALIDITY_DAY;
orderParams.price = 98.50;
kiteConnect.modifyOrder("181019001234569 ", orderParams, Constants.VARIETY_CO);

This is not working. Please Help!

Thanks
Amitesh
  • sujith
    Hi,
    The second leg of a cover order is of type SL-M which means you can only set trigger price for the stop-loss order.
    You can't set a price for the same.
  • Amitesh
    Amitesh edited October 2018
    Hi,

    Yes, I think I was doing the same. I am trying to update the Price of my SL Order. As I mentioned earlier, the ParentOrderID is 181019001234567 , that is this is the order ID of my BUY order and Child OrderID is 181019001234569, that is this is the order ID of my SL order( or Child Order). Please correct me if Im wrong and If Im wrong then could you please tell me how can I get the order ID of my SL order, which I want to modify.

    Also as I Placed CO Buy order of Market Type, I have only one SL order. Please guide me, Im having a huge difficulties here. :(

    Here I meant same order by Child Order and SL Order.

    Thanks
    Amitesh
  • sujith
    sujith edited October 2018
    One can only give trigger price to the SL-M order, once a trigger is hit a market order is punched at the exchange.
    One can't guarantee the price of execution in case of stop-loss market order.
    You can check out more about cover order here.
  • Amitesh
    Hi,

    I do understand what is written in given link. My concern is, how can I update SL order and what should be the parameter value to update. As I provided my parameter value earlier, Could you please tell me which parameter value is wrong. Let me put those data here again

    Order ID of BUY order is: 181019001234567
    Order ID of SL order is: 181019001234569
    Buy Order Price is : 100
    Current SL order Price 98.00
    New SL price should be 98.50

    OrderParams orderParams = new OrderParams();
    orderParams.quantity = 4;
    orderParams.orderType = Constants.ORDER_TYPE_SLM;
    orderParams.tradingsymbol = "ONGC";
    orderParams.product = Constants.PRODUCT_MIS;
    orderParams.exchange = Constants.EXCHANGE_NSE;
    orderParams.transactionType = Constants.TRANSACTION_TYPE_SELL;
    orderParams.validity = Constants.VALIDITY_DAY;
    orderParams.price = 98.50;
    kiteConnect.modifyOrder("181019001234569 ", orderParams, Constants.VARIETY_CO);

    Thanks
    Amitesh
  • rakeshr
    @Amitesh
    You need to set trigger_price = 98.50,instead of price.
Sign In or Register to comment.