How to close a position using dhanhq api

After successfully making a trade how to close a position using dhahq python api?

Hello @trading.sahu059

To close a position via APIs or any platform, you just need to take a reverse trade i.e. if you have long position of x quantity, you need to place a sell order (via Order Placement API) for the same x quantity.

This will essentially close your long position. Hope this helps!