Multi-currency margin mode: cross margin trading

Date de publication : 21 mars 2023Date de mise à jour : 25 oct. 2024Lecture de 16 min

Introduction

After depositing assets to your account, you can trade all instruments in multi-currency margin mode, including spot, margin, expiry futures, perpetual futures, and options. The USD value of your assets is used to calculate margin for placing orders and holding positions. Under auto-borrow mode, if the balance or equity of a certain crypto in your account is insufficient while its equivalent value in USD is sufficient, you can continue selling this crypto through spot trading, or trade the derivatives that are settled in this crypto. When a certain crypto’s equity is less than zero due to being oversold or the loss of contracts that are settled in this crypto, the liability and the corresponding interest of this crypto will be generated automatically.

Under the multi-currency margin mode, the risk is measured in USD. If the user’s overall adjusted equity is sufficient to provide the maintenance margin for all positions in USD, the positions will not be liquidated or reduced. If the adjusted equity is insufficient, all the positions under cross-margin mode will be partially or fully liquidated. Users can isolate the risks by opening positions in isolated margin mode.

Asset fields

Dimension

Term

Explanation

Parameter in Get balance

Crypto

Equity

The total assets of a certain crypto in the multi-currency cross-margin account and isolated positions.

Equity = Balance in the multi-currency margin account + Floating PnL in cross-margin positions + Margin balance in isolated positions + Floating PnL in isolated positions + Options market value - Accrued interest

eq in the details array

Free margin

The margin amount of a certain crypto that can be used for trading margins, expiry futures, perpetual futures, and options (short positions) trading.

Free margin = Max (0, Crypto balance in cross margin + Floating PnL in cross-margin positions – In use)

availEq in the details array

Available balance

The amount of crypto that can be used for isolated positions, spot, and options (long positions) trading under multi-currency account mode.

Note: This description is for order calculation only and will not be displayed as a field on the platform.

availBal in the details array

In use

The amount of crypto in the multi-currency account that is in use, which includes cross open orders, positions, accrued interest, isolated open orders, and assets used in trading bots.

frozenBal in the details array

Floating PnL

The sum of the floating PnL of all margin, futures, and options positions that are settled with a certain crypto, including positions under cross and isolated margin mode.

Floating PnL = Floating PnL of cross-margin positions + Floating PnL of isolated margin positions

Floating PnL of cross-margin positions = Floating PnL of cross-margin expiry futures positions + Floating PnL of cross-margin perpetual futures positions + Floating PnL of cross-margin options positions

Floating PnL of isolated margin positions = Floating PnL of isolated margin positions + Floating PnL of isolated expiry futures positions + Floating PnL of isolated perpetual futures positions + Floating PnL of isolated options positions.

upl in the details array

Liability

Liability = The liability incurred by cross and isolated positions.

Liability under cross-margin mode = |Min (0, Crypto balance in cross margin + Floating PnL of cross-margin positions + Options market value of cross options positions)|

liab in the details array

Account

Account equity

The fiat value of all cryptocurrencies in your account.

Total equity = Sum (Crypto equity × Crypto price)

The crypto price is based on the USD price of the crypto on OKX. If a crypto does not have a USD price, we will calculate using the spot price of the USDT pair of the crypto multiplied by the price of USDT/USD on OKX. If there is no USDT price, we’ll use the spot price of the USDC pair of the crypto multiplied by the price of USDC/USD on OKX. If there is no USDC price, we’ll calculate according to the spot price of the BTC pair of the crypto multiplied by the price of BTC/USD on OKX.

totalEq

Adjusted equity

The discounted fiat value of all cryptocurrencies in the account which can be used to trade spot, expiry futures, perpetual futures, and options in cross-margin mode.

Adjusted equity = Crypto equity x Discount rate x USD price of crypto - Loss from spot orders, orders to buy options and isolated margin open orders - Estimated trading fees from all open orders.

Loss from spot orders, orders to buy options and isolated margin open orders represent the decrease in adjusted equity if the orders are filled.

Loss from spot orders: Change in adjusted equity due to a difference in discount rates between the crypto that is sold and the crypto that is bought.

Loss from orders to buy options: Once filled, the account equity contributed by these options cannot be used as margin.

Loss from isolated margin open orders: Once filled, this portion of equity will form the margin balance of the isolated position and can no longer be used as margin for cross-margin positions.

Note: Discount rates are determined and applied based on the liquidity of each crypto.

adjEq

Position value (USD)

USD value of all cross-margin positions

Crypto-margined expiry and perpetual futures:

Position value (USD) = Face value x Number of contracts x Multiplier / Mark price x USD price of crypto

USDT-margined expiry and perpetual futures:

Position value (USD) = Face value x Number of contracts x Multiplier x Mark price x USD price of crypto

Options:

Position value (USD) = Face value x Number of contracts x Multiplier x USD price of crypto

notionalUsd

Frozen margin

The fiat value of the margin required for open cross-margin orders and positions in the account.

Frozen margin = Sum [(Frozen margin for potential borrowing + Frozen margin for cross-margin open orders + Frozen margin for open positions under cross-margin mode) of each crypto x USD price of crypto]

Note: When you turn on auto-borrow mode under multi-currency cross-margin mode, if the adjusted equity is sufficient, you can sell the assets or trade the derivatives settled in a crypto even if the balance of this crypto is insufficient. The potential borrowing amount of this crypto will increase, and the frozen margin will also increase as a result.

imr

Maintenance margin

The sum of maintenance margin of all open positions under cross-margin mode.

Maintenance margin = Sum (Maintenance margin for cross-margin positions × USD price of crypto)

Maintenance margin = Position value × Maintenance margin requirement

More information on maintenance margin requirements can be found here.

mmr

Account leverage

The leverage of your account. Leverage = Sum (Position value) / Adjusted equity

N/A

Margin level

Risk level of multi-currency cross-margin positions

Margin level = Adjusted equity / (Maintenance margin + Liquidation fees)

Maintenance margin and liquidation fees are calculated using the sum of open positions and open orders

mgnRatio

Discount rate

Under multi-currency cross-margin mode, cryptocurrencies are measured in USD, and this USD value can be used as margin. Due to the volatility of each crypto, our platform calculates the USD value of each crypto based on discount rates to balance market risks. More information on the discount rates for each crypto can be found here.

Example of adjusted equity calculation

Discount rates for BTC with tiers valued in crypto

Tier and discount rate

0 - 20 BTC: 0.98

20 - 25 BTC: 0.975

25 - 30 BTC: 0.97

30 - 50 BTC: 0.965

50 - 70 BTC: 0.96

70 - 90 BTC: 0.955

90 - 110 BTC: 0.95

Assume the price of BTC is 60,000 USD and you have 100 BTC.

Equity = 100 BTC

Equity = 100 × 60,000 = 6,000,000 USD

Adjusted equity = (20 × 0.98 + 5 × 0.975 + 5 × 0.97 + 20 × 0.965 + 20 × 0.96 + 20 × 0.955 + 10 × 0.95) × 60,000 = 5,785,500 USD

Note:
For cryptocurrencies that have a USD index price, the USD price will be used.
For cryptocurrencies that do not have a USD index price but have a USDT spot trading pair, the spot price multiplied by the USDT/USD index price will be used.
For cryptocurrencies that do not have a USDT index price and USDT spot trading pair but have a BTC spot trading pair, the spot price multiplied by the BTC/USD index price will be used.
For cryptocurrencies that do not have a USDT index price, USDT spot trading pair and BTC spot trading pair but have an ETH spot trading pair, the spot price multiplied by the ETH/USD index price will be used.

Trading rules

For multi-currency cross margin mode:

  • The value of all cryptocurrencies is measured in USD using different discount rates, and this USD value can provide margin for all instruments.

  • Users can decide whether to use auto-borrow mode. When a user turns on auto-borrow mode under multi-currency cross-margin mode, if the adjusted equity is sufficient, the user can sell the assets or trade the derivatives settled in a crypto even if the balance of this crypto is insufficient. The potential borrowing amount of this crypto will increase, and the frozen margin will also increase as a result.

  • If the user turns on auto-borrow mode, liability will be automatically generated when the crypto equity is insufficient due to overselling or PnL that is settled in this crypto. The interest generated will be calculated according to the liability of this crypto, and this liability will have an initial margin requirement (IMR) and maintenance margin requirement (MMR).

  • If the user turns off auto-borrow mode, only the available balance or equity of the crypto can be used to place orders for spot, expiry futures, perpetual futures, and options under cross-margin mode and isolated mode. However, the account risk is measured by the overall adjusted equity under cross-margin mode, so there may be a situation in which the equity of a certain crypto cannot pay off the loss settled in this crypto. If the account has surplus equity in other cryptocurrencies, and the overall USD value of the account is sufficient, these cryptocurrencies won’t be sold, and the liability will be generated passively. If the liability is within the interest-free limit, no interest will be charged. When the liability of the crypto exceeds the interest-free limit, forced repayment will be triggered. More information on forced repayment can be found here.

Validation for auto-borrow orders in multi-currency cross-margin mode

Users can turn on auto-borrow mode. When a user trades spot, expiry futures, perpetual futures, and options in cross-margin mode, the overall adjusted equity in the account should be greater than or equal to the frozen margin, inclusive of the current order placed.

Adjusted equity is sufficient

Crypto

Equity

Current Price (USD)

Amount used as margin

Discount rate

ETH

1

3,000

0.5

0.98

USDT

100

1

50

1

STETH

1

3,000

0

0.9


Place an order to sell 1 STETH at a price of 1 ETH/STETH (Assuming no trading fees or interest)

Adjusted equity = Crypto equity × Discount rate × USD price of crypto - Loss from spot orders, orders to buy options, and isolated margin open orders - Estimated trading fees from all open orders

= 1 ETH x 3,000 × 0.98 + 100 USDT × 1 + 1 STETH x 3,000 × 0.9 = 5,740 USD

Loss from this spot order = 0

The loss from spot orders is relative to the discount rate of the crypto bought. The lower the discount rate, the larger the loss. When the discount rate of the crypto bought is 1, there is no loss.

Frozen margin inclusive of the current order placed = 0.5 ETH × 3,000 + 50 USDT × 1 = 1,550 USD

Since the adjusted equity is larger than the frozen margin, inclusive of the current order, the current order can be placed successfully.

Adjusted equity is sufficient, but the crypto balance is insufficient

Crypto

Equity

Current Price (USD)

Amount used as margin

Discount rate

ETH

1

3,000

0.5

0.98

USDT

100

1

50

1

STETH

0

3,000

0

0.9

Place an order to sell 1 STETH at a price of 1 ETH/STETH (Assuming no trading fees or interest)

Adjusted equity = Crypto equity × Discount rate × USD price of crypto - Loss from spot orders, orders to buy options, and isolated margin open orders - Estimated trading fees from all open orders

= 1 ETH × 3,000 × 0.98 + 100 USDT × 1 = 3,040 USD

Loss from this spot order = 0

Frozen margin including this open order = 0.5 ETH × 3,000 + 50 USDT × 1 + Initial margin for potential borrowing of STETH = 1,850 USD

  • Initial margin requirement (IMR) for potential borrowing of STETH = Total potential borrowing amount x Initial margin requirement (IMR) × USD price of STETH = 1 × 10% × 3,000 = 300 USD (Assuming STETH auto-borrow leverage is set to 10x)

  • The total potential borrowing amount is determined by the difference between the available equity of this crypto under cross-margin mode and the frozen amount of the crypto. If the available equity is less than the frozen amount, the difference is the amount of potential borrowing.

Since the adjusted equity is larger than the frozen margin, inclusive of the current order placed, the current order can be placed successfully.

Validation for non auto-borrow orders in multi-currency cross-margin mode

If you want to trade with the available balance but don't want to borrow when opening positions, turn off Auto-borrow in the settings. The adjusted equity in the account should be greater than or equal to the frozen margin inclusive of the current order placed, and the available balance of the crypto should be greater than or equal to the amount required for this order.

Note:

  • The available balance is the amount of assets that can be used to trade spot, open isolated positions, and buy options.

  • The available balance differs from free margin because the former does not account for PnL generated under cross-margin mode.

Example: A trader has 1 BTC and 10,000 ETH in their account. When the adjusted equity > initial margin:

  • The trader can only sell 1 BTC when placing a spot sell order.

  • The trader can only use 1 BTC margin when trading expiry, perpetual futures or options.

  • The trader can only use 1 BTC to buy options.

Potential borrowing limit and interest-free limit

Potential borrowing = Actual borrowing + Virtual borrowing

  • Margin borrowing, borrowing to buy options, and negative floating PnL from open derivative positions are actual borrowing. Actual borrowing will use up your margin tier borrowing limit, main account limit, and the platform’s total lending limit.

  • The borrowing used for opening derivative positions is virtual borrowing. Virtual borrowing uses your margin tier borrowing limit but does not use your main account limit and the platform’s total lending limit.

  • Potential borrowing can also be incurred under both auto-borrow and non auto-borrow modes.

More information on interest-free limits can be found here.

Risk assessment

Multi-currency margin mode has two levels of risk assessments. The first level is called the order cancellation assessment, and the second level is called the pre-liquidation assessment. This ensures that users can trade smoothly and avoid open orders being canceled completely due to insufficient margin.

Order cancellation assessment

Order cancellation via risk control mechanisms will cancel part of the open order when the trader’s account risk is higher than a certain level but has not yet reached the pre-liquidation risk level. This cancellation will reduce liquidation risk and prevent the user from suddenly reaching the pre-liquidation level and causing all open orders to be canceled.

Rules for assessing order cancellation under multi-currency cross-margin mode:

  • When Adjusted margin < Maintenance margin of all positions + Initial margin and fees for opening orders, all the opening orders for futures and options under cross-margin mode will be canceled. If the conditions still meet the requirement after cancellation, then this cancellation will result in a spot trading loss.

  • Non-borrow mode: (Available equity - Frozen balance) < Required maintenance margin for all the positions + Initial margin & fees of opening orders when open positions, all open orders that will increase the amount of the frozen margin will be canceled. When available balance < 0, orders to open positions under isolated mode, options buyer orders, and open orders for selling this crypto will be canceled.

  • Auto-borrow mode: Actual borrowing > Max borrowing limit, all the orders that increase liability will be canceled (including orders to open positions under isolated mode, options buyer orders, and open orders for selling this crypto). When available balance < 0, orders to open positions under isolated mode will be canceled.

Pre-liquidation assessment

The forced liquidation of multi-currency margin mode is based on whether the margin level reaches 100%.

When the margin level is ≤ 300%, the system will send a warning to reduce the positions and the user should be aware of the liquidation risk. 300% is the warning parameter. OKX reserves the right to adjust this parameter according to the actual situation.

When the margin level is ≤ 100%, the system will cancel orders according to the following rules, known as order cancellation by pre-liquidation:

Instruments

Mode

Multi-currency cross mode

Futures

Hedge mode

Cancel all unfilled open orders (including bot orders) under cross margin mode.
Cancel regular open orders for opening positions under isolated margin mode.
Cancel the limit orders and stop-loss orders for opening positions under isolated margin mode.
Keep the TP/SL orders for closing positions under isolated margin mode.
Keep bot orders except for TP/SL orders under isolated margin mode.

One-way mode

Cancel all unfilled open orders (including bot orders) under cross margin mode.
Cancel regular open orders for opening positions under isolated margin mode.
Keep the bot orders for closing positions under isolated margin mode.

Margin

-

Cancel all unfilled open orders (including bot orders) under cross-margin mode.
Cancel regular open orders for opening positions under isolated margin mode.
Keep the bot orders for closing positions under isolated margin mode.

Options

-

Cancel all unfilled open orders under cross margin mode.
Cancel regular pending orders for opening positions under isolated margin mode.

If the margin level is still ≤ 100% after open orders are canceled, forced liquidation will be triggered.

The forced liquidation process has three phases. In each phase, the liquidated positions will be handed over to the forced liquidation engine at the current mark price, and a corresponding amount of maintenance margin will be charged (the maintenance margin is determined by the liquidation tier and will be used to offset the loss caused by the liquidation engine. The remaining part will be counted into the insurance fund). Long options positions won’t be liquidated.

There are 3 phases of partial liquidation:

1. Liquidation will start with positions of the same contracts in the opposite direction under hedge mode.

2. When there is no position described in phase 1, or all positions described in phase 1 are partially liquidated, and liquidation risks have not been reduced significantly, the system will try to keep the total delta value of the account unchanged while attempting to reduce the overall risk of the account. That is, partially liquidate the long and short hedged positions in terms of delta value (Delta refers to a rate of change in the position value of a contract per change in the index price. When the two changes are in the same direction, the delta is positive. Otherwise, it is negative. The greater the change in the position value of a contract per change in the index price, the greater the absolute value of delta). If multiple positions meet the delta long and short offsetting conditions, the system will first partially liquidate the position with a larger maintenance margin.

3. When there is no position described in 2), or all positions described in 2) are partially liquidated (that is, the total delta value of the account cannot be kept almost unchanged at this time, while the account risk cannot be reduced), and liquidation risks have not been reduced significantly, the system will try to partially liquidate the remaining unhedged positions, and will prioritize positions that can help to reduce liquidation risks the most. Each time you partially liquidate your position, the position tier will be reduced by one level until the liquidation risks have been reduced significantly.


For example, the current price of futures contract BTC-USD-0925 is 50,000 USD/BTC, and we assume the assets allocation of an account is as follows:

Type

Amount

Balance

3 BTC, 10ETH

Positions

Futures:BTCUSD0925 1,000 contracts. Position delta > 0
Options: BTCUSD-20200626-65000-C -100 contracts. Position delta < 0
EOSUSD-20200925-6-C -10,000 contracts. Position delta < 0

Open order

Expiry futures: BTCUSD1225: 100 contracts, order price at 9,000
Perpetual futures: BTCUSD: -100 contracts, order price at 8,000

The margin level is 93%, triggering the forced liquidation condition. After canceling all open orders, the margin level becomes 95%, entering the liquidation phase. At this point, the total equity in the account is 170,000 USD, with a maintenance margin of 200,000 USD.

Assume that hedge mode is enabled, and there are no opposite positions of the same contract, but there are opposite positions in terms of delta value in the BTCUSD index. The system liquidates 500 long position futures contracts of BTCUSD0925 and -100 short position options contracts BTCUSD-20200925-65000-C. After liquidation, the account equity is 169,000 USD, and the maintenance margin is 180,000 USD.

If the account is still at risk and there are no opposite positions that can hedge each other in BTCUSD (all short positions of BTCUSD-20200626-65000-C are liquidated, and the delta value of the remaining positions is positive), the system will partially liquidate the remaining positions that can’t hedge each other.

There are 500+ contracts of BTCUSD0925 futures remaining. If the position tier was reduced by one, the total equity would become 165,000 USD, with a maintenance margin of 170,000 USD.

If EOSUSD-20200925-6-C option (short position) position tier was reduced by one, the total equity would become 164,000 USD, with a maintenance margin of 165,000 USD.
In summary:

  • Reducing BTCUSD futures contracts can decrease equity by 4,000 USD and reduce maintenance margin by 10,000 USD.

  • Reducing EOSUSD option positions can decrease equity by 5,000 USD and reduce maintenance margin by 15,000 USD.

Since 10,000 USD is greater than 6,000 USD, priority will be given to reducing your option positions.

If reducing expiry futures contracts does not significantly reduce liquidation risks, the same rules will be followed to select the next position to reduce. When the liquidation results in negative assets, the system will use the insurance fund to offset your negative assets, and a corresponding bankruptcy loss bill will be generated at this time.

This document is provided for informational purposes only. It is not intended to provide any investment, tax, or legal advice, nor should it be considered an offer to purchase, sell, hold or offer any services relating to digital assets. Digital asset holdings, including stablecoins, involve a high degree of risk, can fluctuate greatly, and can even become worthless. Leveraged trading in digital assets magnifies both potential gains and potential losses and could result in the loss of your entire investment. Past performance is not indicative of future results. You should carefully consider whether trading or holding digital assets is suitable for you in light of your financial condition, particularly if considering the use of leverage. You are solely responsible for your trading strategies and decisions, and OKX is not responsible for any potential losses. Not all products and promotions are available in all regions. For more details, please refer to the OKX Terms of Service and Risk & Compliance Disclosure.

© 2024 OKX. All rights reserved.