Skip to main content

Set Position Mode

Description​

Set position mode. In the single-side holding mode, you can only hold either a long or short position. In the bilateral holding mode, you can hold both long and short positions simultaneously. Position or order exists in a trading pair, and the position mode cannot be adjusted.

HTTP Request​

  • POST /api/v3/position/switch-mode
  • Supported Products: linear
  • Rate Limit: 10 requests per second per UID

Request Parameters​

FieldTypeRequiredDescription
categorystringYesProduct type
symbolstringYesTrading pair
modeint64Yes0 long position / 3 both-direction position

Response Parameters​

No business fields. Returns code: 200 in the standard format upon success, as shown below.

Request Example​

POST /api/v3/position/switch-mode 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",
"mode": 3
}

Response Example​

HTTP/1.1 200 OK
Content-Type: application/json

{
"code": 200,
"message": "Success",
"data": {},
"extras": null
}