When using margin on an exchange, is there a function that one can run ( hopefully using python ) that can calculate the Liquidation Price Level when entering
- How much to spend and
- the Margin level chosen (like 10X, 20X, etc.) and
- the current price of the asset (ex: 32000 for bitcoin)
Am open to other possible options as well.
TIA