Get Positions
Returns open positions and their current PnL.
| Method | GET |
| Path | /v5/position/list |
| Auth | Authenticated. |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
category | string | Yes | linear. |
symbol | string | No | Filter by symbol. Omit to list all. |
cursor | string | No | Pagination cursor. |
Request
- Python
- Java
- Go
- Node.js
from reference_client import sign_request, BASE_URL
import requests
headers, path = sign_request(
"GET",
"/v5/position/list",
{"category": "linear", "symbol": "BTCUSDT"},
)
r = requests.get(BASE_URL + path, headers=headers)
print(r.json())
HttpResponse<String> resp = client.send(
"GET", "/v5/position/list", Map.of("category", "linear", "symbol", "BTCUSDT"), null);
System.out.println(resp.body());
headers, p, err := SignRequest("GET", "/v5/position/list", map[string]string{"category": "linear", "symbol": "BTCUSDT"})
if err != nil { panic(err) }
req, _ := http.NewRequest("GET", BaseURL+p, nil)
for k, v := range headers { req.Header.Set(k, v) }
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
const {signRequest, BASE_URL} = require('./reference-client');
const {headers, path} = signRequest('GET', '/v5/position/list', {"category": "linear", "symbol": "BTCUSDT"});
const r = await fetch(BASE_URL + path, {
method: 'GET',
headers,
});
console.log(await r.json());
Response
{
"retCode": 0,
"retMsg": "OK",
"result": {
"category": "linear",
"list": [
{
"symbol": "BTCUSDT",
"side": "Buy",
"size": "0.005",
"positionValue": "548.6471",
"avgPrice": "109729.42",
"markPrice": "109755.4",
"unrealisedPnl": "0.1299",
"cumRealisedPnl": "-0.1920265",
"leverage": "2",
"positionIdx": 1,
"positionStatus": "Normal",
"tradeMode": 0,
"autoAddMargin": 0,
"positionIM": "274.47442796",
"positionMM": "2.89411346",
"createdTime": "1756456567526",
"updatedTime": "1756460295495"
}
]
}
}
Response parameters
| Field | Type | Description |
|---|---|---|
side | string | Buy (long) or Sell (short). |
size | string | Position size in base asset. |
positionValue | string | Current notional value in USDT. |
avgPrice | string | Average entry price. |
markPrice | string | Current mark price. |
unrealisedPnl | string | Unrealised PnL at the current mark price. |
cumRealisedPnl | string | Cumulative realised PnL on this position since it opened. |
leverage | string | Effective leverage on this position. |
positionIdx | integer | 0 = one-way, 1 = long (hedge), 2 = short (hedge). |
positionStatus | string | Normal, Liq, Adl. |
positionIM | string | Initial margin requirement. |
positionMM | string | Maintenance margin requirement — if equity drops below this, liquidation triggers. |