Set Trade Auto Repay
Enable or disable automatic repayment after an eligible spot trade credits a coin to the Unified account. When enabled, the credited coin can repay its own flexible-rate liability without asset conversion. This setting is disabled by default.
info
Trade auto repayment runs only in Cross and Portfolio margin modes. An Isolated margin account can save this setting, but no trade auto repayment runs while it remains in Isolated mode. This setting is separate from scheduled automatic repayment configured through Set Auto Repay Mode.
HTTP Request
POST/v5/spot-margin-trade/set-trade-auto-repayRequest Parameters
| Parameter | Required | Type | Comments |
|---|---|---|---|
| autoRepay | true | string | 1: enable trade auto repayment; 0: disable trade auto repayment. |
Response Parameters
| Parameter | Type | Comments |
|---|---|---|
| autoRepay | string | Saved switch state. 1: enabled; 0: disabled. |
Request Example
- HTTP
POST /v5/spot-margin-trade/set-trade-auto-repay HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1792117143000
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
{
"autoRepay": "1"
}
Response Example
{
"retCode": 0,
"retMsg": "success",
"result": {
"autoRepay": "1"
},
"retExtInfo": {},
"time": 1792117143000
}