After borrowing on OKX margin, the repayment option is not in the "Contracts" page but hidden in the "Assets" section. Find the owed currency and click "Repay". The repayment order: accrued interest is cleared first, and any remainder goes toward the principal.
Step 1: Check Your Current Liabilities
Before doing anything, check how much principal and interest you owe to avoid blind actions.
Goal: View the liability list and unpaid interest in your margin account.
Path: Log into the OKX app or website, go to "Assets", find "Margin account" or directly check "Liabilities". The system lists the owed currencies, principal amounts, and accumulated interest. Interest is charged hourly, so the longer you borrow, the more interest accrues.
Completion: Clearly identify the currency and total amount (principal + interest) you need to repay.
Step 2: Choose Repayment Method Based on Account Mode
OKX's repayment mechanism depends on your account mode, so the steps differ.
Case A: Isolated/Cross margin in Contract or Spot mode – This is the most straightforward. Closing a position automatically repays the loan and interest. The system deducts interest first, then the remainder repays the principal. No manual button clicks needed. After closing, the liability is automatically cleared.
Case B: Cross-currency margin mode – In this mode, closing a position does not automatically remove the liability. You need to go to the [Assets] page to view the liability, buy the required currency in spot trading, then manually click the "Repay" button.
Case C: Manual repayment in spot mode – Easiest method. On the "Assets" page, find the currency you owe, and click the [Repay] button below it. If the available balance in that currency is insufficient, the system will prompt you to sell other assets to repay.
Case D: One-click borrowing with "Auto-repay" in isolated mode – When creating a position, you can choose among three modes (Manual, Auto-borrow, Auto-repay). If you select "Auto-repay", the system automatically detects the liability when an order is filled and uses the purchased amount to repay the debt.
Common Reasons for Failure
Many think closing a position settles everything, but in cross-currency margin mode, the liability remains on the books after closing, and interest continues to accumulate. If not fully repaid, you may even be unable to switch trading modes.
Step 3: Execute Repayment – Pay Attention to Order and Balance
If using manual repayment, note these points:
Goal: Find the liability on the Assets page and click Repay.
Process:
Click the [Repay] button below the owed currency.
The system shows the total amount due (principal + interest) and your available balance.
If the available balance is sufficient, confirm repayment directly.
If not enough, you need to transfer the corresponding currency from another account to the margin account, or check the system prompt "Sell assets to repay".
Completion: The currency in the liability list shows "No liability", and the available balance turns positive.
Risk reminder: In cross-currency or portfolio margin modes, if there is an unrealized loss on a contract position, a currency may show a "negative balance". The system may trigger a forced repayment mechanism, automatically selling other assets in your account (ordered from lowest discount rate to highest, and highest liquidity to lowest) to forcibly buy back the negative-balance currency.
Verification after repayment: After repaying, refresh the "Assets" page and confirm that both the liability and unpaid interest figures for that currency are zero. Only when it shows no liability is it fully cleared.
After clearing liabilities, if you want to switch trading modes (e.g., from cross-currency mode back to spot mode), make sure there are no liabilities in your account. Otherwise, the system will prompt "Please repay liabilities first". If interest still rolls after repayment, it means there is still leftover interest unpaid; it is advisable to click "Full Repayment" to clear it all at once, preventing small residual interest from continuing to accumulate.


