Collateral Repayment
Permission: "Spot trade"
UID rate limit: 1 req / second
info
- Pay interest first, then repay the principal.
- There are limits on the repayment amount in a single transaction. Please read this announcement before repaying with collateral
- When repaying with collateral, Bybit will charge a repayment fee. The applicable fee rate is the higher of the repayment fee rates for the collateral asset and the debt asset. You can call this endpoint: View fee rates by asset to get "reapyFee" where "pledgeEnable" = 1 for coins' repayment fee rates
HTTP Request
POST /v5/crypto-loan-flexible/repay-collateral
Request Parameters
| Parameter | Required | Type | Comments |
|---|---|---|---|
| loanCurrency | true | string | Loan coin name |
| collateralCoin | true | string | Collateral currencies: Use commas to separate multiple collateral currencies |
| amount | true | string | Repay amount |
Response Parameters
None
Request Example
- HTTP
- Python
- Node.js
POST /v5/crypto-loan-flexible/repay-collateral HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1752569628364
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
Content-Length: 52
{
"loanCurrency": "USDT",
"amount": "500",
"collateralCoin":"BTC"
}
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="xxxxxxxxxxxxxxxxxx",
api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
)
print(session.collateral_repayment_flexible_crypto_loan(
loanCurrency="USDT",
amount="500",
collateralCoin="BTC",
))
Response Example
{
"retCode": 0,
"retMsg": "ok",
"result": {},
"retExtInfo": {},
"time": 1756971550401
}