Alter the automatical margin call
Description
POST /future/user/v1/position/auto-margin
Content-Type = application/x-www-form-urlencoded && application/json
Limit Flow Rules
- 200/s/apikey
Parameters
| Name | Type | Mandatory | Default | Description | Ranges |
|---|---|---|---|---|---|
| symbol | string | Yes | N/A | Trading pair | |
| positionSide | string | Yes | N/A | Position side | LONG; SHORT |
| autoMargin | boolean | Yes | N/A | Whether to automatically call margin | true; false |
Request Example
Request
curl -X POST "https://fapi.xt.com/future/user/v1/position/auto-margin" \
-H "validate-appkey: $APPKEY" \ # Required
-H "validate-timestamp: $TIMESTAMP" \ # Required
-H "validate-singature: $SINGATURE" \ # Required
-H "Content-Type: application/x-www-form-urlencoded" \ # Required
-d "symbol=btc_usdt" \ # Required
-d "positionSide=SHORT" \ # Required
-d "autoMargin=true" \ # Required
Response Example
{
"error": {
"code": "",
"msg": ""
},
"msgInfo": "",
"result": {},
"returnCode": 0
}
Error code
| Error code | Desc |
|---|---|
| invalid_symbol | The trading pair does not exist or cannot be empty |
| invalid_position_side | Position side cannot be empty |
| invalid_auto_margin | Auto margin configuration cannot be empty |