Skip to content
UNHEDGED / DOCS

Search documentation

Browse docs or start typing to find a topic

↑ ↓ to navigate Enter to open Esc to close

Documentation

Back to app

Get Active Positions

GET https://api.unhedged.gg/api/v1/portfolio/me/positions

Returns unresolved positions. Use marketType=ORDER_BOOK for paginated share inventory across markets, avoiding per-market /portfolio/me/shares requests.

Configure request

Request

Security · Bearer token

Send your API key in the Authorization header. Required scope portfolio:read.

Rate limit · 1,000,000 req/min

Query parameters

marketId string
Optional filter to a single market.
marketType string
Use ORDER_BOOK to return order-book positions.
limit number
Results per page (default 50, 1–500).
offset number
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_here
Query parameters
curl https://api.unhedged.gg/api/v1/portfolio/me/positions \
  -H "Authorization: Bearer ak_your_key_here"
Response
{
  "positions": [
    {
      "marketId": "clx...",
      "marketType": "ORDER_BOOK",
      "outcomeIndex": 0,
      "outcomeName": "YES",
      "totalBetAmount": "64.5000000000",
      "betCount": 2,
      "currentValue": "71.2000000000",
      "unrealizedPnl": "6.7000000000",
      "unrealizedPnlPercent": 10.39,