Skip to main content

Move Position

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

Unified account covers: USDT perpetual / USDC contract / Spot / Option

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.

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
> symboltruestringSymbol name
> pricetruestringTrade price
  • linear: 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

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: XXXXXX
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": ""
}
}