Modify CO Order

Shabeershah2002
Hi

As your documentation gives just a sample for Regular order modification and stated to change :variety in the url parameter to modify other type of orders ,
i cannot find a sample to ease my coding , have been trying to figure it out but no luck
please help me if below parameter are correct to modify a CO order , because i am keep on getting Bad Request !!

curl --request PUT https://api.kite.trade/orders/co/First_Leg_Order_ID\
-H "X-Kite-Version: 3" \
-H "Authorization: token api_key:access_token" \
-d "order_id=Second_Leg_Order_ID" \
-d "price=0" \
-d "trigger_price=1234"

or do i need to add any other parameter to get it worked ?

Tagged:
  • sujith
    sujith edited June 2018
    To modify a second leg cover order you need to send second leg order id in the URL route and parent_order_id in the body.
    curl --request PUT https://api.kite.trade/orders/co/Second_Leg_Order_ID\
    -H "X-Kite-Version: 3" \
    -H "Authorization: token api_key:access_token" \
    -d "parent_order_id=First_Leg_Order_ID" \
    -d "trigger_price=1234"
  • Shabeershah2002
    Thank you for your swift response , all these time i was trying and refreshing this thread to see if someone responded , you saved my time !
    let me try this and get back to you
    i suggest if you could give each order type samples on your documentation will be helpful for them who are building their own program.
  • Shabeershah2002
    yes its working ok now......thanks
    please update your document , no where it says parent or leg id.......
  • sujith
    We will update documentation.
This discussion has been closed.