how to Close all positions in future Api.

I am unable to close the open positions. Can anyone guide me that i am right path. Currently i am try to close the positions using create orders api with below parameters. I have 2 sale orders in open positions and i want close them. Is that right way to close position at Market price?

Binance.futures_create_order(symbol=self.symbol, side=‘BUY’, type=‘Limit’,closePosition=true)

To close a open position. You just have to place an order in the opposite direction. For example, if you have a long position of 1 BTCUSDT, you just need to
Binance.futures_create_order(symbol=‘BTCUSDT’, side=‘SELL’, type=‘Market’,quantity=1)
The syntax of above may differ depending on your library but you should get the idea.