Set Trade Auto Repay
Enable or disable automatic repayment after an eligible spot trade credits a coin to the Unified account. The credited coin can repay its own flexible-rate liability without asset conversion. Trade auto repayment runs only in Cross and Portfolio margin modes; the setting has no effect in Isolated mode. This setting is separate from scheduled auto repayment configured through set-auto-repay-mode, and is disabled by default.
- application/json
Request Body required
- autoRepay string required
Possible values: Value must match regular expression
^[01]$"1" enables trade auto repayment; "0" disables it.
- 200
- 400
- 401
- 403
- 404
- 429
Request accepted; a non-zero retCode indicates a business error.
- application/json
- Schema
- Example (from schema)
- Enabled
Schema
- retCode integer
Business return code. 0 means success; 34022101 means invalid autoRepay.
- retMsg string
Business return message.
result object
autoRepay stringPossible values: Value must match regular expression
^[01]$Saved switch state; "1" means enabled and "0" means disabled.
- retExtInfo object
Extended return information.
- time int64
Server timestamp in milliseconds.
{
"retCode": 0,
"retMsg": "success",
"result": {
"autoRepay": "1"
},
"retExtInfo": {},
"time": 1792117143000
}
Trade auto repayment enabled
{
"retCode": 0,
"retMsg": "success",
"result": {
"autoRepay": "1"
},
"retExtInfo": {},
"time": 1792117143000
}
Invalid HTTP request or parameter format.
API authentication failed.
API key lacks write permission or the request is restricted.
Endpoint not found.
Rate limit exceeded.