setTradeAutoRepay
Enable or disable trade auto repayment for an authenticated Unified account, letting eligible spot trade credits repay their own flexible-rate liability in Cross or Portfolio margin mode.
Instructions
Enable (autoRepay="1") or disable (autoRepay="0") trade auto repayment for the authenticated Unified account. Requires explicit client approval. When enabled, a coin credited by an eligible spot trade can repay its own flexible-rate liability without asset conversion; the amount depends on the trade credit, available balance, and outstanding liability. This account-wide switch is disabled by default and separate from scheduled auto repayment configured by setAutoRepayMode. Repayment runs only in Cross and Portfolio margin modes. Isolated accounts can save the setting, but no trade auto repayment runs while they remain in Isolated mode. A successful response reports the saved switch in result.autoRepay, not a completed repayment. autoRepay must be the string "0" or "1"; 34022101 means invalid autoRepay. Locally limited to 5 requests per rolling second per path within one MCP process. Business failures surface as MCP tool errors.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"autoRepay": "<autoRepay>"
},
"name": "setTradeAutoRepay"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| autoRepay | Yes |