second leg id CO

Ronit
how to cancel the co order. i receive order id when placing the co order, but how to get the order id of second leg?? so that i can exit the co order?
Thanks
  • rakeshr
    @Ronit
    You should use parent_order_id. On successful placement of an order, you will receive an order_id. This is the entry order_id. Once the first leg is executed, there will be two second leg orders placed by the system and those will have a parent_order_id field which points to the first leg order.
  • Ronit
    so I search in all of my orders ?? to find the orders which have this parent_id, isn't there any other way than to search in all of my orders??
  • sujith
    That is the only way to find a second leg order for a cover order.
Sign In or Register to comment.