setAutoAddMargin
Toggle auto-add margin on isolated positions to automatically add margin from available balance and prevent liquidation. Works for linear contracts.
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).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | ||
| symbol | Yes | ||
| autoAddMargin | Yes | ||
| positionIdx | No |