Skip to main content

Get Position Info

Query real-time position data, such as position size, cumulative realizedPNL.

Unified account covers: USDT perpetual / USDC contract / Inverse contract / Options
Classic account covers: USDT perpetual / Inverse contract

info

Regarding inverse contracts,

  1. you can query all holding positions with "/v5/position/list?category=inverse";
  2. symbol parameter is supported to be passed with multiple symbols up to 10

HTTP Request

GET /v5/position/list

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct type
  • Unified account: linear, inverse, option
  • Classic account: linear, inverse
symbolfalsestringSymbol name
  • If symbol passed, it returns data regardless of having position or not.
  • If symbol=null and settleCoin specified, it returns position size greater than zero.
baseCoinfalsestringBase coin. option only. Return all option positions if not passed
settleCoinfalsestringSettle coin. For linear, either symbol or settleCoin is required. symbol has a higher priority
limitfalseintegerLimit for data size per page. [1, 200]. Default: 20
cursorfalsestringCursor. Use the nextPageCursor token from the response to retrieve the next page of the result set

Response Parameters

ParameterTypeComments
categorystringProduct type
listarrayObject
> positionIdxintegerPosition idx, used to identify positions in different position modes
  • 0: One-Way Mode
  • 1: Buy side of both side mode
  • 2: Sell side of both side mode
> riskIdintegerRisk limit ID. Note: for portfolio margin mode, this field returns 0, which means risk limit rules are invalid
> riskLimitValuestringRisk limit value. Note: for portfolio margin mode, this field returns 0, which means risk limit rules are invalid
> symbolstringSymbol name
> sidestringPosition side. Buy: long, Sell: short
  • Classic account in one-way mode & Unified account (inverse), an empty position returns None.
  • UTA account(linear contracts), either one-way or hedge mode returns an empty string for an empty position.
> sizestringPosition size
> avgPricestringAverage entry price
  • For USDC Perp & Futures, it indicates average entry price, and it will not be changed with 8-hour session settlement
  • > positionValuestringPosition value
    > tradeModeintegerTrade mode
    • Classic & UTA (inverse): 0: cross-margin, 1: isolated margin
    • UTA: depreciated, always 0
    > autoAddMarginintegerWhether to add margin automatically. 0: false, 1: true. For UTA, it is meaningful only when UTA enables ISOLATED_MARGIN
    > positionStatusStringPosition status. Normal, Liq, Adl
    > leveragestringPosition leverage. Valid for contract. Note: for portfolio margin mode, this field returns "", which means leverage rules are invalid
    > markPricestringLast mark price
    > liqPricestringPosition liquidation price
    • UTA (inverse) & UTA (isolated margin enabled) & Classic account: it is the real price for isolated and cross positions, and keeps "" when liqPrice <= minPrice or liqPrice >= maxPrice
    • UTA (Cross margin mode): it is an estimated price for cross positions(because the unified mode controls the risk rate according to the account), and keeps "" when liqPrice <= minPrice or liqPrice >= maxPrice
    However, this field is empty for Portfolio Margin Mode, and no liquidation price will be provided
    > bustPricestringBankruptcy price. Note: Unified mode returns "", no position bankruptcy price (exclude inverse trade under UTA)
    > positionIMstringInitial margin. For portfolio margin mode, it returns ""
    > positionMMstringMaintenance margin. For portfolio margin mode, it returns ""
    > positionBalancestringPosition margin
  • UTA(linear): Only meaningful for isolated margin mode
  • > tpslModestringDepreciated, meaningless here, always "Full". Spot does not return this field. Option returns ""
    > takeProfitstringTake profit price
    > stopLossstringStop loss price
    > trailingStopstringTrailing stop (The distance from market price)
    > sessionAvgPricestringUSDC contract session avg price, it is the same figure as avg entry price shown in the web UI
    > deltastringDelta, unique field for option
    > gammastringGamma, unique field for option
    > vegastringVega, unique field for option
    > thetastringTheta, unique field for option
    > unrealisedPnlstringUnrealised PnL
    > curRealisedPnlstringThe realised PnL for the current holding position
    > cumRealisedPnlstringCumulative realised pnl
    • Futures & Perp: it is the all time cumulative realised P&L
    • Option: always "", meaningless
    > adlRankIndicatorintegerAuto-deleverage rank indicator. What is Auto-Deleveraging?
    > isReduceOnlybooleanUseful when Bybit lower the risk limit
    • true: Only allowed to reduce the position. You can consider a series of measures, e.g., lower the risk limit, decrease leverage or reduce the position, add margin, or cancel orders, after these operations, you can call confirm new risk limit endpoint to check if your position can be removed the reduceOnly mark
    • false: There is no restriction, and it means your position is under the risk when the risk limit is systematically adjusted
    • Only meaningful for isolated margin & cross margin of USDT Perp, USDC Perp, USDC Futures, Inverse Perp and Inverse Futures, meaningless for others
    > mmrSysUpdatedTimestringUseful when Bybit lower the risk limit
    • When isReduceOnly=true: the timestamp (ms) when the MMR will be forcibly adjusted by the system
    • When isReduceOnly=false: the timestamp when the MMR had been adjusted by system
    • It returns the timestamp when the system operates, and if you manually operate, there is no timestamp
    • Keeps "" by default, if there was a lower risk limit system adjustment previously, it shows that system operation timestamp
    • Only meaningful for isolated margin & cross margin of USDT Perp, USDC Perp, USDC Futures, Inverse Perp and Inverse Futures, meaningless for others
    > leverageSysUpdatedTimestringUseful when Bybit lower the risk limit
    • When isReduceOnly=true: the timestamp (ms) when the leverage will be forcibly adjusted by the system
    • When isReduceOnly=false: the timestamp when the leverage had been adjusted by system
    • It returns the timestamp when the system operates, and if you manually operate, there is no timestamp
    • Keeps "" by default, if there was a lower risk limit system adjustment previously, it shows that system operation timestamp
    • Only meaningful for isolated margin & cross margin of USDT Perp, USDC Perp, USDC Futures, Inverse Perp and Inverse Futures, meaningless for others
    > createdTimestringPosition created timestamp (ms)
    > updatedTimestringPosition updated timestamp (ms)
    > seqlongCross sequence, used to associate each fill and each position update
    • Different symbols may have the same seq, please use seq + symbol to check unique
    • Returns "-1" if the symbol has never been traded
    • Returns the seq updated by the last transaction when there are settings like leverage, risk limit
    nextPageCursorstringRefer to the cursor request parameter

    Request Example

    GET /v5/position/list?category=inverse&symbol=BTCUSD HTTP/1.1
    Host: api-testnet.bybit.com
    X-BAPI-SIGN: XXXXX
    X-BAPI-API-KEY: XXXXX
    X-BAPI-TIMESTAMP: 1672280218882
    X-BAPI-RECV-WINDOW: 5000

    Response Example

    {
    "retCode": 0,
    "retMsg": "OK",
    "result": {
    "list": [
    {
    "positionIdx": 0,
    "riskId": 1,
    "riskLimitValue": "150",
    "symbol": "BTCUSD",
    "side": "Sell",
    "size": "300",
    "avgPrice": "27464.50441675",
    "positionValue": "0.01092319",
    "tradeMode": 0,
    "positionStatus": "Normal",
    "autoAddMargin": 1,
    "adlRankIndicator": 2,
    "leverage": "10",
    "positionBalance": "0.00139186",
    "markPrice": "28224.50",
    "liqPrice": "",
    "bustPrice": "999999.00",
    "positionMM": "0.0000015",
    "positionIM": "0.00010923",
    "tpslMode": "Full",
    "takeProfit": "0.00",
    "stopLoss": "0.00",
    "trailingStop": "0.00",
    "unrealisedPnl": "-0.00029413",
    "curRealisedPnl": "0.00013123",
    "cumRealisedPnl": "-0.00096902",
    "seq": 5723621632,
    "isReduceOnly": false,
    "mmrSysUpdateTime": "",
    "leverageSysUpdatedTime": "",
    "sessionAvgPrice": "",
    "createdTime": "1676538056258",
    "updatedTime": "1697673600012"
    }
    ],
    "nextPageCursor": "",
    "category": "inverse"
    },
    "retExtInfo": {},
    "time": 1697684980172
    }