Example of code for Futures TRADE with ISOLATED and 'x1' leverage ?

Hello,
Can someone post an example of OPEN a futures-trade (BTCUSDT Perpetual) with leverage = ‘x1’ and Margin=‘ISOLATED’?
Can someone post an example of CLOSE a futures-Trade?

Thank s for your help

Please Help

You can set Leverage and Margin beforehand with:

Binance API Documentation
Binance API Documentation

You can check the logic to close position here: