Modify open "LIMIT" Cover Order to type "MARKET"

krishmetra
Hi,
Is it possible to modify a "LIMIT" order type CO, which is either partially executed or not executed at all,
in both the cases order is still open.
Can I modify the order_type to "MARKET" using the following function
modifyOrder($variety="co", $order_id, $params("order_type"=>"MARKET"))

The basic idea is that my wait time for LIMIT order is expired and to avoid risk I want to modify it to "MARKET"

Thanks.
  • sujith
    One can't modify a cover entry order type, you will have to modify the limit price to LTP so that your order gets placed.
  • krishmetra
    @sujith Do I need to specifiy other parameters of the order again ? such as quantity, Trigger Price.

    modifyOrder($variety="co", $order_id, $params("price"=>$ltp))

    Does the above code work ?
  • sujith
    You can take a look at a similar example here.
  • krishmetra
    krishmetra edited November 2019
    @sujith
    The example points to "modifyFirstLegBo" function.
    my case is CO which is shown above that function in the example.

    It sends all the order parameters once again, including the TradingSymbol, qnty, order_type, exchange, validity, price.

    My question is, can I just send the "price"=>LTP alone to modify the order ?

    in case of a partially filled order, do I need to specify the qnty as unfilled qnty or send the full qnty once again ?
    I believe I can not give new Trigger Price for the unfilled qnty. Please confirm.

    please help.
  • sujith
    The method for modifying the bracket order and cover order is the same.

    It is not enough to send one param. You need to send additional params as mentioned in the example.

    You always send the total quantity of the order. End-user shouldn't worry about the filled and unfilled quantity in this case.
  • sujith
    Of course, you can't change the trigger price for the filled quantity.
This discussion has been closed.