Skip to main content

Move Position

You can move positions between sub-master, master-sub, or sub-sub UIDs when necessary

info
  • The endpoint can only be called by master UID api key
  • UIDs must be the same master-sub account relationship
  • The trades generated from move-position endpoint will not be displayed in the Recent Trade (Rest API & Websocket)
  • There is no trading fee
  • fromUid and toUid both should be Unified trading accounts, and they need to be one-way mode when moving the positions
  • Please note that once executed, you will get execType=MovePosition entry from Get Trade History, Get Closed Pnl, and stream from Execution.
  • TradFi perpetual contracts (including forex, stock, and commodities) are supported starting from 2026-08-06

HTTP Request​

POST/v5/position/move-positions

Request Parameters​

ParameterRequiredTypeComments
fromUidtruestringFrom UID
  • Must be UTA
  • Must be in one-way mode for Futures
toUidtruestringTo UID
  • Must be UTA
  • Must be in one-way mode for Futures
listtruearrayObject. Up to 25 legs per request
> categorytruestringProduct type linear, spot, option,inverse
> symboltruestringSymbol name, like BTCUSDT, uppercase only
> pricetruestringTrade price
  • linear&inverse: the price needs to be between [95% of mark price, 105% of mark price]
  • spot&option: the price needs to follow the price rule from Instruments Info
> sidetruestringTrading side of fromUid
  • For example, fromUid has a long position, when side=Sell, then once executed, the position of fromUid will be reduced or open a short position depending on qty input
> qtytruestringExecuted qty
  • The value must satisfy the qty rule from Instruments Info, in particular, category=linear is able to input maxOrderQty * 5
> reduceOnlyfalsebooleanReduces or closes an existing position without opening a position in the opposite direction.

Usage and requirements:
  1. Applies only to fromUid and only to Futures and Options.
  2. When reduceOnly=true, fromUid must have a non-zero position. For a long position, side must be Sell.
  3. If qty exceeds the position size, the entire position is closed.
  4. Cancel all active orders for the symbol before initiating the position move with reduceOnly=true in case any executions during position movement in-flight.
  5. If any leg fails to execute, all other legs also fail.

Response Parameters​

ParameterTypeComments
retCodeintegerResult code. 0 means request is successfully accepted
retMsgstringResult message
resultmapObject
> blockTradeIdstringBlock trade ID
> statusstringStatus. Processing, Rejected
> rejectPartystring
  • "" means initial validation is passed, please check the order status via Get Move Position History
  • Taker, Maker when status=Rejected
  • bybit means error is occurred on the Bybit side

Request Example​

POST /v5/position/move-positions HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1697447928051
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json

{
"fromUid": "100307601",
"toUid": "592324",
"list": [
{
"category": "spot",
"symbol": "BTCUSDT",
"price": "100",
"side": "Sell",
"qty": "0.01"
}
]
}

Response Example​

{
"retCode": 0,
"retMsg": "OK",
"result": {
"blockTradeId": "e9bb926c95f54cf1ba3e315a58b8597b",
"status": "Processing",
"rejectParty": ""
}
}