Skip to main content

Switch Position Mode

It supports to switch the position mode for USDT perpetual and Inverse futures. If you are in one-way Mode, you can only open one position on Buy or Sell side. If you are in hedge mode, you can open both Buy and Sell side positions simultaneously.

Unified account covers: USDT perpetual / Inverse Futures
Classic account covers: USDT perpetual / Inverse Futures

tip
  • Priority for configuration to take effect: symbol > coin > system default
  • System default: one-way mode
  • If the request is by coin (settleCoin), then all symbols based on this setteCoin that do not have position and open order will be batch switched, and new listed symbol based on this settleCoin will be the same mode you set.

Example

System defaultcoinsymbol
Initial settingone-waynever configurednever configured
ResultAll USDT perpetual trading pairs are one-way mode
Change 1--Set BTCUSDT to hedge-mode
ResultBTCUSDT becomes hedge-mode, and all other symbols keep one-way mode
list new symbol ETHUSDTETHUSDT is one-way mode (inherit default rules)
Change 2-Set USDT to hedge-mode-
ResultAll current trading pairs with no positions or orders are hedge-mode, and no adjustments will be made for trading pairs with positions and orders
list new symbol SOLUSDTSOLUSDT is hedge-mode (Inherit coin rule)
Change 3--Set ASXUSDT to one-mode
Take effect resultAXSUSDT is one-way mode, other trading pairs have no change
list new symbol BITUSDTBITUSDT is hedge-mode (Inherit coin rule)

The position-switch ability for each contract

Classic accountUnified account
USDT perpetualSupport one-way & hedge-modeSupport one-way & hedge-mode
USDC perpetualSupport one-way onlySupport one-way only
Inverse perpetualSupport one-way onlySupport one-way only
Inverse futureSupport one-way & hedge-modeSupport one-way & hedge-mode

HTTP Request

POST /v5/position/switch-mode

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct type
  • Unified account: linear, USDT Perp; inverse, Inverse Futures
  • Classic account: linear, USDT Perp; inverse, Inverse Futures. Please note that category is not involved with business logic
symbolfalsestringSymbol name. Either symbol or coin is required. symbol has a higher priority
coinfalsestringCoin
modetrueintegerPosition mode. 0: Merged Single. 3: Both Sides

Response Parameters

None

Request Example

POST /v5/position/switch-mode HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1675249072041
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
Content-Length: 87

{
"category":"inverse",
"symbol":"BTCUSDH23",
"coin": null,
"mode": 0
}

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {},
"retExtInfo": {},
"time": 1675249072814
}