My Position
Get real-time position data
HTTP Request
GET /unified/v3/private/position/list
Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
category | true | string | Product type. linear , option |
symbol | false | string | Symbol name |
baseCoin | false | string | Base coin.
|
settleCoin | false | string | Settle coin |
direction | false | string | Page direction. prev , next . default: next |
limit | false | integer | Limit for data size per page. [1 , 200 ]. default: 20 |
cursor | false | string | Cursor. Used to pagination |
Response Parameters
- linear
- option
Parameter | Type | Comments |
---|---|---|
nextPageCursor | string | Cursor. Used to pagination |
category | string | Products category |
list | array | Object |
> symbol | string | Symbol name |
> leverage | string | Leverage value. For portfolio margin mode, it returns "", which the leverage rule is invalid |
> updatedTime | integer | Update time of position (ms) |
> side | string | `Buy`, `Sell` |
> positionValue | string | Total value of position |
> takeProfit | string | Take profit price |
> tpslMode | string | Tp/SL mode. `Partial`, `Full` |
> riskId | integer | Risk limit ID. For portfolio margin mode, it returns 0, which the risk limit rule is invalid |
> trailingStop | string | Trailing stop (the distance from the current price) |
> entryPrice | string | Average entry price |
> unrealisedPnl | string | Unrealised pnl |
> markPrice | string | Mark price |
> size | string | Position size |
> stopLoss | string | Stop loss price |
> cumRealisedPnl | string | Cumulative realised profit and loss |
> positionMM | string | Position maintenance margin. For portfolio margin mode, it returns "" |
> createdTime | integer | Created time (ms) |
> positionIdx | integer | Position idx, used to identify positions in different position modes |
> positionIM | string | Position initial margin. For portfolio margin mode, it returns "" |
Parameter | Type | Comments |
---|---|---|
nextPageCursor | string | Cursor. Used to pagination |
category | string | Products category |
list | array | Object |
> symbol | string | Symbol name |
> updatedTime | integer | Update time of position (ms) |
> side | string | `Buy`, `Sell` |
> positionValue | string | Total value of position |
> entryPrice | string | Average entry price |
> unrealisedPnl | string | Unrealised pnl |
> markPrice | string | Mark price |
> size | string | Position size |
> cumRealisedPnl | string | Cumulative realised profit and loss |
> positionMM | string | Position maintenance margin. For portfolio margin mode, it returns "" |
> createdTime | integer | Created time |
> positionIdx | integer | Not Applicable |
> positionIM | string | Position initial margin. For portfolio margin mode, it returns "" |
Request Example
- Console-linear
- Console-option
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
GET /unified/v3/private/position/list?category=option&baseCoin=ETH HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672018474913
X-BAPI-RECV-WINDOW: 5000
Response Example
- linear
- option
{
"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
}
{
"retCode": 0,
"retMsg": "Success",
"result": {
"nextPageCursor": "ETH-30DEC22-700-C%3A1672018465372%2CETH-30DEC22-700-C%3A1672018465372",
"category": "option",
"list": [
{
"symbol": "ETH-30DEC22-700-C",
"updatedTime": 1672018465372,
"side": "Sell",
"positionValue": "49.80000000",
"entryPrice": "498.00000000",
"unrealisedPnl": "-2.02774092",
"markPrice": "518.27740924",
"size": "-0.1000",
"cumRealisedPnl": "0.00000000",
"positionMM": "55.72735692",
"createdTime": 1672018465365,
"positionIdx": 0,
"positionIM": "70.10719092"
}
]
},
"retExtInfo": {},
"time": 1672018475719
}