Alter Margin
Type POST
Description: /future/user/v1/position/margin
Parameters
| Name | Type | Mandatory | Default | Description |
|---|---|---|---|---|
| symbol | string | Yes | N/A | Trading pair |
| margin | number | No | N/A | Quantity |
| positionSide | string | No | N/A | Position side (LONG, SHORT) |
| type | string | No | N/A | Adjust direction (ADD: add isolated margin, SUB: reduce isolated margin) |
Limit Flow Rules
200/s/apikey
Request Example
Request
curl -X POST "https://fapi.xt.com/future/user/v1/position/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 "margin=9999" \
-d "positionSide=SHORT" \
-d "type=ADD"
Response Example
Response
{
"error": {
"code": "",
"msg": ""
},
"msgInfo": "",
"result": {},
"returnCode": 0
}
Error code
| Error code | Desc |
|---|---|
| invalid_params | Missing parameters |
| invalid_margin | Invalid margin |