There is no particular method for executing a square-off order. To square off an order, you must use the same method Place Order originally used for placing the order.
To perform the square-off, you need to modify the transaction_type parameter based on the type of your initial leg. The square-off transaction_type
will be the opposite of the order type that was initially placed.
Cancel order can be used to cancel orders currently in an open or pending status.