Get User Positions
Get all open positions for a user.Copy
Ask AI
GET /api/markets/positions/{userId}
Copy
Ask AI
{
"predictions": [
{
"id": "pos-123",
"marketId": "market-456",
"question": "Will BTC reach $100k?",
"outcome": "YES",
"shares": 100,
"avgPrice": 0.65,
"currentPrice": 0.72,
"value": 72,
"unrealizedPnL": 7
}
],
"perpetuals": [
{
"id": "perp-789",
"ticker": "AAPL",
"side": "long",
"collateral": 1000,
"leverage": 10,
"entryPrice": 170,
"markPrice": 175,
"unrealizedPnL": 294.12
}
],
"totalValue": 1372,
"totalUnrealizedPnL": 301.12
}