Set Auto Repay Mode
Set spot automatic repayment mode
info
- If
currencyis not passed, spot automatic repayment will be enabled for all currencies. - If
autoRepayModeof a currency is set to 1, the system will automatically make repayments without asset conversion to that currency at 0 and 30 minutes every hour. - The amount of repayments without asset conversion is the minimum of available spot balance in that currency and liability of that currency.
- If you missed the automatic repayment batches for 0 and 30 minutes every hour, you can manually make the repayment via the API. Please refer to Manual Repay Without Asset Conversion
HTTP Request
POST /v5/spot-margin-trade/set-auto-repay-mode
Request Parameters
| Parameter | Required | Type | Comments |
|---|---|---|---|
| currency | false | string | Coin name, uppercase only. If currency is not passed, spot automatic repayment will be enabled for all currencies. |
| autoRepayMode | true | string |
|
Response Parameters
| Parameter | Type | Comments |
|---|---|---|
| data | array | Object |
| > currency | string | Coin name, uppercase only. |
| > autoRepayMode | string |
|
Request Example
- HTTP
- Python
- Node.js
POST /v5/spot-margin-trade/set-auto-repay-mode HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1672299806626
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
{
"currency": "ETH",
"autoRepayMode":"1"
}
Response Example
{
"retCode": 0,
"retMsg": "success",
"result": {
"data": [
{
"currency": "ETH",
"autoRepayMode": "1"
}
]
},
"retExtInfo": {},
"time": 1766976677678
}