Hi @sujith Please help me to do it, like follows exactly using python code
1. get the on going order and their id ( not cancelled, not rejected, not completed ) 2. put a CO order with following details for example 3. Buy Gold with market price and stoploss of market price - 1 4. get the bought price ( point 3 ) from last executed orders 5. how to modify the stoploss of ( point 3 ) last executed orders
Please help me to have the exact codes for above points
In the response of the place order, you will receive an order id, you need to fetch orderbook and check the average price for the same order. A child order of this cover order will have a parent order id field which will have the above order_id which can be used to identify the order and you can modify the trigger price of the second leg order.
Please help me to do it, like follows exactly using python code
1. get the on going order and their id ( not cancelled, not rejected, not completed )
2. put a CO order with following details for example
3. Buy Gold with market price and stoploss of market price - 1
4. get the bought price ( point 3 ) from last executed orders
5. how to modify the stoploss of ( point 3 ) last executed orders
Please help me to have the exact codes for above points
Thanks
You can check out params here to place a cover order https://github.com/zerodhatech/javakiteconnect/blob/master/sample/src/Examples.java#L88
In the response of the place order, you will receive an order id, you need to fetch orderbook and check the average price for the same order.
A child order of this cover order will have a parent order id field which will have the above order_id which can be used to identify the order and you can modify the trigger price of the second leg order.
i could understand your procedure to fix it, but i am going to work on it after sometimes, i will ask you if i have any doubt when i implement it
thanks lot