Square off using API

Iam not able to find any api for squaring off the position, pls let me know if there is a way using api

Hi @kedar We will evaluate adding this - square off all API. Most API users of Dhan exit their positions individually - place Sell order for Buy position and otherwise.

Hi @PravinJ, it is much needed… as if we are placing trades in automated way we should be able to exit them in same way.

As I see you are saying to square off a buy position asking to place sell order. But using current apis that ends up placing a new sell order instead of squaring off the existing one.

And In automated trading whatever the triggers we place are not triggered then orders will stay remain as it is and EOD we will be ended up paying auto square off charges.

Please correct me if there is some other way.