> ## Documentation Index
> Fetch the complete documentation index at: https://docs.limitless.exchange/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Positions

> Retrieve all active positions with P&L calculations and market values

<Tip>
  For real-time position updates, use the [WebSocket API](/developers/websocket-events) — subscribe to `subscribe_positions`.
</Tip>

<Info>
  `status: RESOLVED` and `winningOutcomeIndex` indicate that the winning outcome is known in the API response. They do **not** guarantee that the underlying conditional token payout has already been settled on-chain or that the position is immediately redeemable. See [Programmatic API - Lifecycle after a trade](/developers/programmatic-api#lifecycle-after-a-trade).
</Info>


## OpenAPI

````yaml GET /portfolio/positions
openapi: 3.0.0
info:
  title: Limitless Exchange API
  description: >-
    Production-ready REST API for prediction market trading, portfolio
    management, and market data on Limitless Exchange (Base L2).
  version: '1.0'
  contact:
    name: API Support
    url: https://limitless.exchange
    email: help@limitless.network
servers:
  - url: https://api.limitless.exchange
    description: Production API
security: []
tags:
  - name: Authentication
    description: User authentication and session management
  - name: Markets
    description: Browse, search, and analyze prediction markets
  - name: Market Navigation
    description: Navigation tree, market pages, and property filters
  - name: Trading
    description: Create, manage, and cancel orders
  - name: Portfolio
    description: Position tracking, trade history, and performance
  - name: API Tokens
    description: Scoped API token management for partner integrations
  - name: Partner Accounts
    description: Sub-account creation and allowance recovery for partner integrations
  - name: System
    description: Public API state and availability information
paths:
  /portfolio/positions:
    get:
      tags:
        - Portfolio
      summary: Get Positions
      description: Retrieve all active positions with P&L calculations and market values
      operationId: PortfolioController_getPositions
      parameters: []
      responses:
        '200':
          description: Complete portfolio positions with summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortfolioPositionsDto'
        '401':
          description: Unauthorized
      security:
        - HmacAuth: []
components:
  schemas:
    PortfolioPositionsDto:
      type: object
      properties:
        rewards:
          description: Rewards information for the portfolio
          allOf:
            - $ref: '#/components/schemas/PortfolioRewardsDto'
        points:
          type: number
          description: User points
          example: 123
        accumulativePoints:
          type: number
          description: User accumulative points
          example: 456
        amm:
          description: List of AMM positions
          type: array
          items:
            $ref: '#/components/schemas/AmmPositionDto'
        clob:
          description: List of CLOB positions
          type: array
          items:
            $ref: '#/components/schemas/ClobPositionDto'
        group:
          description: Grouped CLOB positions (if enabled)
          type: array
          items:
            type: object
      required:
        - rewards
        - points
        - accumulativePoints
        - amm
        - clob
    PortfolioRewardsDto:
      type: object
      properties:
        todaysRewards:
          type: string
          description: Rewards earned today in token decimals
          example: '50250000'
        totalUnpaidRewards:
          type: string
          description: Total unpaid rewards in token decimals
          example: '200750000'
        totalUserRewardsLastEpoch:
          type: string
          description: Total user rewards from the last epoch in token decimals
          example: '150500000'
        rewardsChartData:
          description: Chart data showing rewards over time
          type: array
          items:
            $ref: '#/components/schemas/PortfolioRewardsChartEntryDto'
        rewardsByEpoch:
          description: Rewards data by epoch
          type: array
          items:
            $ref: '#/components/schemas/EpochRewardDataDto'
      required:
        - todaysRewards
        - totalUnpaidRewards
        - totalUserRewardsLastEpoch
        - rewardsByEpoch
    AmmPositionDto:
      type: object
      properties:
        collateralAmount:
          type: string
          description: Amount of collateral invested in token decimals
          example: '100500000'
        latestTrade:
          type: object
          description: Latest trade associated with this position
        market:
          type: object
          description: Market information for this position
        outcomeIndex:
          type: number
          description: Index of the outcome token
          example: 0
        outcomeTokenAmount:
          type: string
          description: Amount of outcome tokens held in token decimals
          example: '50250000'
        account:
          type: string
          description: Wallet address that was used to create this position
          example: '0x1234567890123456789012345678901234567890'
      required:
        - market
        - outcomeIndex
    ClobPositionDto:
      type: object
      properties:
        market:
          description: Market information
          allOf:
            - $ref: '#/components/schemas/Market'
        positions:
          description: Position data for the market
          allOf:
            - $ref: '#/components/schemas/MarketPositionDataDto'
        latestTrade:
          type: object
          description: Latest trade prices
        tokensBalance:
          type: object
          description: Token balances in token decimals
        orders:
          type: object
          description: Order information
        rewards:
          type: object
          description: Rewards information for this position
      required:
        - market
        - positions
        - tokensBalance
        - orders
    PortfolioRewardsChartEntryDto:
      type: object
      properties:
        timestamp:
          type: number
          description: Timestamp of the rewards entry
          example: 1672531200000
        userRewards:
          type: string
          description: User rewards for this timestamp in token decimals
          example: '25000000'
        totalRewards:
          type: string
          description: Total rewards for this timestamp in token decimals
          example: '60000000'
      required:
        - timestamp
        - userRewards
        - totalRewards
    EpochRewardDataDto:
      type: object
      properties:
        epochId:
          type: number
          description: Unique identifier of the epoch
          example: 1
        timestamp:
          format: date-time
          type: string
          description: Timestamp when the epoch occurred
          example: '2024-01-01T00:00:00.000Z'
        totalRewards:
          type: string
          description: Total rewards distributed in this epoch in token decimals
          example: '1500000'
        userRewards:
          type: string
          description: User rewards earned in this epoch in token decimals
          example: '150000'
        earnedPercent:
          type: number
          description: Part of total rewards earned by the user - [0; 1]
          example: 0.1
      required:
        - epochId
        - timestamp
        - totalRewards
        - userRewards
        - earnedPercent
    Market:
      type: object
      properties:
        address:
          type: string
          description: The address of the FixedProductMarketMaker contract.
          minLength: 42
          maxLength: 42
          nullable: true
          uniqueItems: true
        title:
          type: string
          description: >-
            Represents the question of the market, the title metadata of the
            market.
          maxLength: 70
          nullable: false
          uniqueItems: true
        proxyTitle:
          type: string
          maxLength: 70
          default: null
          nullable: true
          uniqueItems: true
        description:
          type: string
          description: The description of the market.
          uniqueItems: false
          nullable: false
        question_id:
          type: object
          description: The bytes32 parsed title of the market.
          minLength: 66
          maxLength: 66
          uniqueItems: true
          nullable: true
        condition_id:
          type: object
          description: >-
            The bytes32 conditionId of the market, representing the conditions
            defined on condition preparation.
          minLength: 66
          maxLength: 66
          nullable: true
          uniqueItems: true
        position_ids:
          description: Array of position IDs (max 2 elements)
          maxItems: 2
          nullable: true
          items:
            type: array
          type: array
        outcome_slot_count:
          type: number
          description: The number of outcomes in the market.
          minimum: 2
          maximum: 2
          nullable: false
          default: 2
        winning_index:
          type: number
          description: >-
            The outcome index reported by the oracle. Indexes into the fixed
            `['Yes', 'No']` outcome array: `0` = YES resolved, `1` = NO
            resolved, `null` = not yet resolved.
          minimum: 0
          maximum: 1
          nullable: true
        payout_numerators:
          description: The oracle payout numerators that the oracle reported.
          nullable: true
          type: array
          items:
            type: string
        status:
          type: string
          description: Indicates the status of the market.
          nullable: false
        og_url:
          type: string
          description: The URL of the market OG image for SEO.
          nullable: true
        image_url:
          type: string
          description: The URL of the market logo image for SEO.
          nullable: true
        deadline:
          type: string
          description: The deadline of the market.
          nullable: false
        startAt:
          type: string
          format: date-time
          description: The start time of the market.
          nullable: true
        hidden:
          type: boolean
          default: false
        txHash:
          type: string
          default: null
        resolutionTxHash:
          type: string
          default: null
        priority_index:
          type: number
          default: null
      required:
        - address
        - title
        - proxyTitle
        - description
        - question_id
        - condition_id
        - position_ids
        - outcome_slot_count
        - winning_index
        - payout_numerators
        - status
        - og_url
        - image_url
        - deadline
        - startAt
        - hidden
        - txHash
        - resolutionTxHash
        - priority_index
    MarketPositionDataDto:
      type: object
      properties:
        'yes':
          description: Position data for YES outcome
          example:
            cost: '75000000'
            fillPrice: '750000'
            realisedPnl: '0'
            unrealizedPnl: '25000000'
            marketValue: '100000000'
          allOf:
            - $ref: '#/components/schemas/PositionDataDto'
        'no':
          description: Position data for NO outcome
          example:
            cost: '25000000'
            fillPrice: '250000'
            realisedPnl: '0'
            unrealizedPnl: '-5000000'
            marketValue: '20000000'
          allOf:
            - $ref: '#/components/schemas/PositionDataDto'
      required:
        - 'yes'
        - 'no'
    PositionDataDto:
      type: object
      properties:
        cost:
          type: string
          description: Cost basis of the position in token decimals (e.g. 1 USDC = 1000000)
          example: '75000000'
        fillPrice:
          type: string
          description: >-
            Average fill price of the position (price per share in token
            decimals)
          example: '750000'
        realisedPnl:
          type: string
          description: Realized profit/loss from closed positions in token decimals
          example: '0'
        unrealizedPnl:
          type: string
          description: >-
            Unrealized profit/loss based on current market price in token
            decimals
          example: '25000000'
        marketValue:
          type: string
          description: Current market value of the position in token decimals
          example: '100000000'
      required:
        - cost
        - fillPrice
        - realisedPnl
        - unrealizedPnl
        - marketValue
  securitySchemes:
    HmacAuth:
      type: apiKey
      in: header
      name: lmts-api-key
      description: >-
        Scoped API token with HMAC-SHA256 signing. Requires three headers:
        lmts-api-key (token ID), lmts-timestamp (ISO-8601), lmts-signature
        (Base64-encoded HMAC). See Authentication docs for details.

````