setAutoAddMargin
Enable or disable auto-add margin for isolated linear positions. When enabled, automatically adds available balance to prevent liquidation. For hedge mode, set positionIdx.
Instructions
Toggle the auto-add-margin feature for a position. When enabled, the system automatically adds margin from available balance to prevent liquidation. Only works in isolated margin mode.
Agent hint: Use this to toggle auto-add-margin on isolated margin positions. Set autoAddMargin to 1 (enable) or 0 (disable). Only works for linear contracts in isolated margin mode. In hedge mode, specify positionIdx (1=buy, 2=sell).
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": {
"category": "<category>",
"symbol": "<symbol>",
"autoAddMargin": "<autoAddMargin>"
},
"name": "setAutoAddMargin"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| category | Yes | ||
| positionIdx | No | ||
| autoAddMargin | Yes |