Get Active Positions
GET
https://api.unhedged.gg /api/v1/portfolio/me/positionsReturns unresolved positions. Use marketType=ORDER_BOOK for paginated share inventory across markets, avoiding per-market /portfolio/me/shares requests.
Configure requestRequest
Security · Bearer token
Send your API key in the Authorization header. Required scope portfolio:read.
Rate limit · 1,000,000 req/min
Query parameters
marketIdstring- Optional filter to a single market.
marketTypestring- Use ORDER_BOOK to return order-book positions.
limitnumber- Results per page (default 50, 1–500).
offsetnumber- Pagination offset (default 0).
Response fields
- ORDER_BOOK fields
- Order-book positions include quantity, availableQuantity, lockedQuantity, averagePrice, hasBids, feesPaid, openOrderCount, and canSell. markPrice is included when hasBids is true.
- markPrice, currentValue, unrealized P/L
- markPrice is the best executable sell bid, including cross-outcome liquidity. Value and P/L estimates exclude exit fees and do not guarantee depth for the full position.
- hasBids
- When false, markPrice, currentValue, estimatedPayout, unrealizedPnl, and unrealizedPnlPercent are omitted. Also false for unresolved markets that are ENDED or at/after scheduledResolutionTime ?? endTime, even if resting orders remain.
- canSell
- True when the market is ACTIVE, before its cutoff, and shares are available to sell. A limit sell can still be placed without a bid.
Authorization
Bearer token
Authorization: Bearer ak_your_key_hereQuery parameters
curl https://api.unhedged.gg/api/v1/portfolio/me/positions \
-H "Authorization: Bearer ak_your_key_here" {
"positions": [
{
"marketId": "clx...",
"marketType": "ORDER_BOOK",
"outcomeIndex": 0,
"outcomeName": "YES",
"totalBetAmount": "64.5000000000",
"betCount": 2,
"currentValue": "71.2000000000",
"unrealizedPnl": "6.7000000000",
"unrealizedPnlPercent": 10.39,