Skip to main content

My Position

Get real-time position data

HTTP Request

GET /unified/v3/private/position/list

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct type. linear, option
symbolfalsestringSymbol name
baseCoinfalsestringBase coin.
  • category=option, then BTC records returned by default
settleCoinfalsestringSettle coin
directionfalsestringPage direction. prev, next. default: next
limitfalseintegerLimit for data size per page. [1, 200]. default: 20
cursorfalsestringCursor. Used to pagination

Response Parameters

ParameterTypeComments
nextPageCursorstringCursor. Used to pagination
categorystringProducts category
listarrayObject
> symbolstringSymbol name
> leveragestringLeverage value. For portfolio margin mode, it returns "", which the leverage rule is invalid
> updatedTimeintegerUpdate time of position (ms)
> sidestring`Buy`, `Sell`
> positionValuestringTotal value of position
> takeProfitstringTake profit price
> tpslModestringTp/SL mode. `Partial`, `Full`
> riskIdintegerRisk limit ID. For portfolio margin mode, it returns 0, which the risk limit rule is invalid
> trailingStopstringTrailing stop (the distance from the current price)
> entryPricestringAverage entry price
> unrealisedPnlstringUnrealised pnl
> markPricestringMark price
> sizestringPosition size
> stopLossstringStop loss price
> cumRealisedPnlstringCumulative realised profit and loss
> positionMMstringPosition maintenance margin. For portfolio margin mode, it returns ""
> createdTimeintegerCreated time (ms)
> positionIdxintegerPosition idx, used to identify positions in different position modes
  • `0`: One-Way Mode
  • > positionIMstringPosition initial margin. For portfolio margin mode, it returns ""

    Request Example

    GET /unified/v3/private/position/list?category=linear&symbol=XRPUSDT HTTP/1.1
    Host: api-testnet.bybit.com
    X-BAPI-SIGN: XXXXX
    X-BAPI-API-KEY: XXXXX
    X-BAPI-TIMESTAMP: 1672820718517
    X-BAPI-RECV-WINDOW: 5000

    Response Example

    {
    "retCode": 0,
    "retMsg": "OK",
    "result": {
    "nextPageCursor": "updateAt%3D1672819200214",
    "category": "linear",
    "list": [
    {
    "symbol": "XRPUSDT",
    "updatedTime": 1672819200214,
    "leverage": "10",
    "side": "Buy",
    "positionValue": "34.91000000",
    "takeProfit": "",
    "tpslMode": "Partial",
    "riskId": 41,
    "trailingStop": "0",
    "entryPrice": "0.34910000",
    "unrealisedPnl": "0.00000000",
    "markPrice": "0.34910000",
    "size": "100.0000",
    "cumRealisedPnl": "-0.02444200",
    "stopLoss": "",
    "positionMM": "0.36795140",
    "createdTime": 1672016298024,
    "positionIdx": 0,
    "positionIM": "3.50985140"
    }
    ]
    },
    "retExtInfo": {},
    "time": 1672820720159
    }