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

# Portfolio

> Get portfolio summary with exposure and concentration metrics.

Returns aggregated portfolio data including:
- Per-venue buckets: `sim`, `polymarket`, `kalshi` — each with balance,
  pnl, positions_count, total_exposure
- `total`: summed counts and exposure across venues (units are mixed —
  use per-venue buckets for financially accurate aggregation)
- Flat legacy fields (`balance_usdc`, `sim_balance`, `positions_count`,
  etc.) kept populated for backwards compatibility

Query params:
- venue: Filter which venues to compute. Default 'all'. The `total` and
  per-venue buckets reflect this filter.

Requires API key in Authorization header.

<Tip>
  **Venue-aware response.** The `sim`, `polymarket`, `kalshi`, and `total` buckets are the preferred shape. Use `?venue=sim|polymarket|kalshi|all` to filter (default `all`).

  The legacy flat fields (`balance_usdc`, `sim_balance`, `positions_count`, `total_exposure`) remain populated for backwards compatibility, but `positions_count` only counts Polymarket positions — use `portfolio.sim.positions_count`, `portfolio.total.positions_count`, or the per-venue buckets for accurate counts.
</Tip>


## OpenAPI

````yaml /openapi.json get /api/sdk/portfolio
openapi: 3.1.0
info:
  title: Simmer API
  description: Agent-native trading infrastructure for prediction markets.
  version: 1.0.0
servers:
  - url: https://api.simmer.markets
security: []
paths:
  /api/sdk/portfolio:
    get:
      summary: Portfolio
      description: |-
        Get portfolio summary with exposure and concentration metrics.

        Returns aggregated portfolio data including:
        - Per-venue buckets: `sim`, `polymarket`, `kalshi` — each with balance,
          pnl, positions_count, total_exposure
        - `total`: summed counts and exposure across venues (units are mixed —
          use per-venue buckets for financially accurate aggregation)
        - Flat legacy fields (`balance_usdc`, `sim_balance`, `positions_count`,
          etc.) kept populated for backwards compatibility

        Query params:
        - venue: Filter which venues to compute. Default 'all'. The `total` and
          per-venue buckets reflect this filter.

        Requires API key in Authorization header.
      operationId: api_sdk_portfolio_api_sdk_portfolio_get
      parameters:
        - name: venue
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Venue filter: 'all' (default), 'sim', 'polymarket', or 'kalshi'.
              Per-venue buckets are always populated when applicable; this
              filters which are computed.
            default: all
            title: Venue
          description: >-
            Venue filter: 'all' (default), 'sim', 'polymarket', or 'kalshi'.
            Per-venue buckets are always populated when applicable; this filters
            which are computed.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SDKPortfolioSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SDKPortfolioSummary:
      properties:
        balance_usdc:
          anyOf:
            - type: number
            - type: 'null'
          title: Balance Usdc
        sim_balance:
          anyOf:
            - type: number
            - type: 'null'
          title: Sim Balance
        sim_pnl:
          anyOf:
            - type: number
            - type: 'null'
          title: Sim Pnl
        total_exposure:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Exposure
        positions_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Positions Count
        redeemable_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Redeemable Count
        pnl_24h:
          anyOf:
            - type: number
            - type: 'null'
          title: Pnl 24H
        pnl_total:
          anyOf:
            - type: number
            - type: 'null'
          title: Pnl Total
        concentration:
          anyOf:
            - $ref: '#/components/schemas/SDKPortfolioConcentration'
            - type: 'null'
        by_source:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: By Source
        warnings:
          items:
            type: string
          type: array
          title: Warnings
        combos:
          anyOf:
            - items:
                $ref: '#/components/schemas/SDKPolymarketComboPosition'
              type: array
            - type: 'null'
          title: Combos
        sim:
          anyOf:
            - $ref: '#/components/schemas/SDKPortfolioVenueBucket'
            - type: 'null'
        polymarket:
          anyOf:
            - $ref: '#/components/schemas/SDKPortfolioVenueBucket'
            - type: 'null'
        kalshi:
          anyOf:
            - $ref: '#/components/schemas/SDKPortfolioVenueBucket'
            - type: 'null'
        total:
          anyOf:
            - $ref: '#/components/schemas/SDKPortfolioTotal'
            - type: 'null'
      type: object
      title: SDKPortfolioSummary
      description: |-
        Portfolio summary with aggregated metrics.

        Venue-bucketed fields (`sim`, `polymarket`, `kalshi`, `total`) are the
        preferred shape for multi-venue agents. The flat fields (`balance_usdc`,
        `sim_balance`, `positions_count`, etc.) remain populated for backwards
        compatibility with older SDK/skill versions.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SDKPortfolioConcentration:
      properties:
        top_market_pct:
          type: number
          title: Top Market Pct
        top_3_markets_pct:
          type: number
          title: Top 3 Markets Pct
      type: object
      required:
        - top_market_pct
        - top_3_markets_pct
      title: SDKPortfolioConcentration
      description: Portfolio concentration metrics.
    SDKPolymarketComboPosition:
      properties:
        combo_id:
          type: string
          title: Combo Id
        legs:
          items:
            $ref: '#/components/schemas/SDKPolymarketComboLeg'
          type: array
          title: Legs
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        filled_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Filled At
        status:
          type: string
          title: Status
        size:
          anyOf:
            - type: number
            - type: 'null'
          title: Size
        potential_payout:
          anyOf:
            - type: number
            - type: 'null'
          title: Potential Payout
        actual_payout:
          anyOf:
            - type: number
            - type: 'null'
          title: Actual Payout
        holderAddress:
          anyOf:
            - type: string
            - type: 'null'
          title: Holderaddress
      type: object
      required:
        - combo_id
        - status
      title: SDKPolymarketComboPosition
      description: Read-only Polymarket Positions-Framework combo position.
    SDKPortfolioVenueBucket:
      properties:
        balance:
          anyOf:
            - type: number
            - type: 'null'
          title: Balance
        pnl:
          anyOf:
            - type: number
            - type: 'null'
          title: Pnl
        positions_count:
          type: integer
          title: Positions Count
          default: 0
        total_exposure:
          type: number
          title: Total Exposure
          default: 0
      type: object
      title: SDKPortfolioVenueBucket
      description: |-
        Per-venue portfolio rollup.

        balance is in the venue's native currency:
        - sim: $SIM
        - polymarket: USDC (Polygon)
        - kalshi: USDC (Solana)
    SDKPortfolioTotal:
      properties:
        positions_count:
          type: integer
          title: Positions Count
          default: 0
        total_exposure:
          type: number
          title: Total Exposure
          default: 0
      type: object
      title: SDKPortfolioTotal
      description: |-
        Total across all venues.

        Counts are summed directly; exposure is summed in venue-native units
        and is not currency-normalized (since $SIM ≠ USDC). Use the per-venue
        buckets for accurate financial aggregation.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SDKPolymarketComboLeg:
      properties:
        market_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Market Title
        side:
          anyOf:
            - type: string
            - type: 'null'
          title: Side
      type: object
      title: SDKPolymarketComboLeg
      description: A leg inside a Polymarket Positions-Framework combo position.

````