how place a CO order and their parameters, and how can i modify it

dharmaraj81
hi,

i would like to place a CO order using python api client,

How can i place it,??

what are the mandatory parameters??

Also, how can i modify it, especially how to update stoploss value after my order has been placed ??

pls let me know the exact codes for it, i will perform it based on ltp from ticker data, i have got the ticker data using api

so API has been connected using my credentials, and getting ticker data also

so pls dont explain me to again to how to connect and get the auth code

Thanks Advance
Dharma
  • dharmaraj81
    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

    Thanks
  • sujith
    To get pending orders, you need to fetch orderbook and check the status, the status must not be COMPLETE, REJECTED, CANCELLED.
    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.
  • dharmaraj81
    hi @sujith

    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
Sign In or Register to comment.