Adjust Margin
Description
Adjust margin
- margin is a decimal string: "100" means adding 100 USDT, "-100" means reducing 100 USDT. Reduction amount must pass validation via available margin reduction or related business rules.
HTTP Request
- POST
/api/v3/position/add-margin - Supported Products:
linear - Rate Limit: 10 requests per second per UID
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
category | string | Yes | Product type |
symbol | string | Yes | Trading pair |
margin | string | Yes | Add/Reduce margin amount (positive for addition, negative for reduction) |
positionIdx | int64 | No | Position direction: 0 for single position, 1 for dual position (long), 2 for dual position (short) |
Response Parameters
| Field | Type | Description |
|---|---|---|
category | string | Product type |
symbol | string | Trading pair |
positionIdx | int32 | Position direction |
size | string | Position quantity |
positionValue | string | Position value |
avgPrice | string | Average entry price. |
liqPrice | string | liquidation price |
Request Example
POST /api/v3/position/add-margin HTTP/1.1
Host: openapi.lbank.com
Content-Type: application/json
ex-api-key: <your_api_key>
ex-timestamp: <current_unix_timestamp_ns>
ex-nonce: <unique_random_hex>
ex-signature: <your_signature>
ex-client-type: API
{
"category": "linear",
"symbol": "BTCUSDT",
"margin": "100",
"positionIdx": 0
}
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"code": 200,
"message": "Success",
"data": {
"category": "linear",
"symbol": "BTCUSDT",
"positionIdx": 0,
"size": "0.010",
"positionValue": "600.00000000",
"avgPrice": "60000.00000000",
"liqPrice": "44100.0"
},
"extras": null
}