How can I do derivatives trading with the Jupyter Notebook?
For example, when you want to trade 3000 ETHUSDT perpetual contracts, you can leverage a maximum of 75 times the capital you own. IMR = 1 / 75 = 1.3%, and you must maintain 0.8% MMR or above to avoid liquidation. There are 9 different scenarios for leverage settings via OKX open APIs. Please refer to Set leverage scenarios for different cases. For perpetual swaps, there are 3 different scenarios for leverage setting: Set leverage for SWAP instruments under cross-margin trade at contract level.
Published on Sep 28, 2023Updated on Feb 12, 2026193