Borrow in spot mode
Introduction
After transferring crypto into your trading account, you can use these crypto as collateral to borrow and trade on leverage. You can choose to borrow manually before trading or borrow automatically when the order is filled. The USD value of your assets will be used during order validation and when borrowing.
Asset fields
Dimension | Term | Explanation | Parameter in Get balance API |
---|---|---|---|
Crypto | Equity | The total equity of a certain crypto in the account. | eq in the details array |
Available balance | The amount of crypto that can be used for spot, and options (long positions) trading. | availBal in the details array | |
In use | The amount of crypto in the spot account that is in use, which includes open orders and assets used in trading bots. | frozenBal in the details array | |
Borrowings | The amount of crypto that has been borrowed. It is inclusive of interest that has been accrued and deducted. | liab in the details array | |
Account | Account equity | The fiat value of all cryptocurrencies in your account. Total equity = Sum (Crypto equity × Crypto price) | totalEq |
Adjusted equity | The discounted fiat value of all cryptocurrencies in the account which can be used to trade spot, and options (long positions) trading Adjusted equity = Crypto equity x Discount rate x USD price of crypto - Loss from spot orders - Estimated trading fees from all open orders. Loss from spot orders represent the decrease in adjusted equity if the orders are filled. Note: Discount rates are determined and applied based on the liquidity of each crypto. | adjEq | |
Frozen margin | The fiat value of margin required for borrowings in the account. | imr | |
Account leverage | The effective leverage of your account. Leverage = Borrowings / Adjusted equity | N/A | |
Margin level | Risk level of borrowing Margin level = Adjusted equity / (Maintenance margin + Liquidation fees) | mgnRatio |
Discount rate
In borrowing 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.
Trading rules
The value of all cryptocurrencies is measured in USD using different discount rates, and this USD value can provide margin for borrowings.
If the adjusted equity is sufficient, the user can sell crypto even if the balance of this crypto is insufficient. The potential borrowing amount for open orders will increase and the frozen margin will also increase as a result.
When users have borrowings, interest will be accrued and deducted on an hourly basis. The borrowed amount will have an initial margin requirement (IMR) and maintenance margin requirement (MMR).
There might be scenarios where user-based forced repayment or platform-based forced repayment is triggered and assets are sold to repay liabilities. For more details, refer to Forced repayment.
Validation for auto-borrow orders
Adjusted equity is sufficient
Crypto | Equity | Current Price (USD) | In use | Discount rate |
BTC | 0.1 | 60,000 | 0 | 0.98 |
ETH | 1 | 3,000 | 0 | 0.98 |
USDT | 0 | 1 | 0 | 1 |
Place an auto-borrow order to sell 6,000 USDT at a price of 60,000 BTC/USDT (Assuming leverage is 2x and there are no trading fees or interest)
Adjusted equity = 0.1 BTC x 60,000 x 0.98 + 1 ETH x 3,000 x 0.98 - 60,000 x 0.1 x (1 - 0.98) = 8,700 USD
Frozen margin inclusive of the current order placed = 6,000 / 2 = 3,000 USD
Since the adjusted equity is larger than the frozen margin, inclusive of the current order, the current order can be placed successfully. After the order is filled, the user will have 6,000 USDT of borrowing.
Adjusted equity is insufficient
Crypto | Equity | Current price | In use | Discount rate |
BTC | 0.1 | 60,000 | 0 | 0.98 |
ETH | 1 | 3,000 | 0 | 0.98 |
USDT | 0 | 1 | 6,000 | 1 |
Assuming the order above has not been filled, the user decides to place another order to sell 12,000 USDT at a price of 60,000 BTC/USDT (Assuming leverage is 2x and there are no trading fees or interest)
Adjusted equity = 0.1 BTC x 60,000 x 0.98 + 1 ETH x 3,000 x 0.98 - 60,000 x 0.3 x (1 - 0.98) = 8,460 USD
Frozen margin inclusive of the current order placed = 3,000 + 12,000 / 2 = 9,000 USD
Since the adjusted equity is less than the frozen margin, inclusive of the current order, the current order will not be placed successfully.
Validation for non auto-borrow orders
When placing non auto-borrow orders, 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.
Example: A trader has 1 BTC and 10,000 ETH in their account. When the adjusted equity ≥ frozen margin inclusive of the current order placed:
The trader can only sell 1 BTC when placing a spot sell order.
The trader can only use 1 BTC to buy options.
Note: When modifying existing orders, they will become auto-borrow orders and will be validated as such.
Validation for borrowing manually
The maximum borrowable amount is calculated using your available margin and leverage, while factoring in the borrowing limit of your current account tier, the position tier limit of the crypto, and the limit of the Simple Earn Flexible pool.
Note: The leverage used in calculations will factor in the user's assets. For example, if a user's current leverage is 2x and the user manually borrows, the max borrowable amount will be calculated assuming that user is borrowing with 1x leverage.
Adjusted equity is sufficient
Crypto | Equity | Current price | In use | Discount rate |
BTC | 0.1 | 60,000 | 0 | 0.98 |
USDT | 0 | 1 | 0 | 1 |
User decides to manually borrow 1,000 USDT (Assuming leverage is 2x)
Adjusted equity = 0.1 BTC x 60,000 x 0.98 = 5,880 USD
Frozen margin inclusive of the current amount to be borrowed = 1,000 / 2 = 500 USD
Since the adjusted equity is larger than the frozen margin, inclusive of the current amount to be borrowed, 1,000 USDT will be borrowed successfully.
Adjusted equity is insufficient
Crypto | Equity | Current price | In use | Discount rate |
BTC | 0.1 | 60,000 | 0 | 0.98 |
USDT | 0 | 1 | 0 | 1 |
User decides to manually borrow 12,000 USDT (Assuming leverage is 2x)
Adjusted equity = 0.1 BTC x 60,000 x 0.98 = 5,880 USD
Frozen margin inclusive of the current amount to be borrowed = 12,000 / 2 = 6,000 USD
Since the adjusted equity is smaller than the frozen margin, inclusive of the current amount to be borrowed, user will be unable to borrow.
Risk assessment
Order Cancellation Assessment
To prevent liquidation, our system assesses whether to cancel outstanding orders before the user’s account reaches the liquidation threshold. This process is designed to help the user’s position drop below the critical risk threshold, avoiding immediate liquidation after certain orders are filled.
Rules for Order Cancellation in Borrow in Spot Mode:
Risk Threshold: Order cancellation is triggered when the net assets in the user’s account are less than the sum of the account's maintenance margin and the initial margin for any open auto borrow orders.
Action Taken: The system will cancel all orders if the above condition is met. This preventive measure aims to stabilize the user's margin level by reducing potential liabilities.
Forced Liquidation:
When the margin level of your account falls below 100%, the system initiates forced liquidation to protect the user's account from further losses. Here’s how this process works:
Margin Level Warning: If the margin level falls to 300% or lower, the system will notify the trader of potential liquidation risks. This is a default setting, but the platform reserves the right to adjust it according to market conditions.
When the margin level drops to 100% or lower:
Repayment of Borrowed Assets and Interest: For the same currency, our system will prioritize using the assets in your account to repay the borrowed assets and the interest generated. For example, if you borrowed 1 BTC and have 2 BTC in your account, we will first repay 1 BTC along with the corresponding borrowing interest.
Trigger for Forced Liquidation: The system will trigger forced liquidation, progressively reducing the tiers until the margin level exceeds 100%. If the tier-by-tier reduction is still insufficient to meet the requirement, the system will trigger full liquidation.
Example (not representative):
The user borrows BTC for operations and holds USDT.
The maximum borrowing amount for the current level is the equivalent of 1,000,000 USDT in BTC.
If the user borrows the equivalent of 1,100,000 USDT in BTC and the margin level drops below 100%, the system will partially liquidate by reducing the borrowing amount to the equivalent of 1,000,000 USDT in BTC, thus lowering the borrowing to the next tier. This cycle will keep continuing until account margin level >100%
Conclusion
Borrow in Spot Mode offers robust risk management through clearly defined rules for order cancellation and liquidation. These mechanisms work together to protect traders from potential excessive losses by ensuring that margin requirements are met and by implementing preventive actions like order cancellation and tier-based liquidation. You should still maintain full responsibility for your assets and adjust them accordingly in order to prevent liquidation. Understanding these processes is crucial for managing your trades effectively and minimizing the risk of forced liquidation.
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.