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

# Get global PnL leaderboard

> Trader leaderboard including combo fields.



## OpenAPI

````yaml https://api.struct.to/openapi.json get /polymarket/trader/global_pnl
openapi: 3.1.0
info:
  title: Polymarket API
  description: >-
    RESTful API for querying Polymarket prediction markets data including
    events, markets, traders, holders, and real-time metrics
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.struct.to/v1
security: []
paths:
  /polymarket/trader/global_pnl:
    get:
      tags:
        - Trader
      summary: Get global PnL leaderboard
      description: Trader leaderboard including combo fields.
      operationId: get_global_pnl
      parameters:
        - name: timeframe
          in: query
          description: 'Default: lifetime'
          required: false
          schema:
            $ref: '#/components/schemas/PnlTimeframe'
        - name: sort_by
          in: query
          description: >-
            Default: total_pnl_usd. Includes the fee-excluded `raw_*` PnL
            metrics and `combo_trade_count`.
          required: false
          schema:
            $ref: '#/components/schemas/TraderPnlSortBy'
        - name: sort_direction
          in: query
          description: 'Default: desc'
          required: false
          schema:
            $ref: '#/components/schemas/SortDirection'
        - name: limit
          in: query
          description: Default 50, max 500
          required: false
          schema:
            type: integer
            format: int32
        - name: pagination_key
          in: query
          description: Cursor from a previous response
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Leaderboard page
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TraderPnl'
        '400':
          description: Invalid params
components:
  schemas:
    PnlTimeframe:
      type: string
      enum:
        - 1d
        - 7d
        - 30d
        - lifetime
    TraderPnlSortBy:
      type: string
      description: >-
        Sort field for the trader-grain endpoints (`/global_pnl`,
        `/pnl/{address}`).

        Includes fee-excluded (`raw_*`) PnL metrics and `combo_trade_count`

        (number of combo-exchange fills, lifetime).
      enum:
        - realized_pnl_usd
        - total_pnl_usd
        - unrealized_pnl_usd
        - raw_total_pnl_usd
        - raw_realized_pnl_usd
        - raw_unrealized_pnl_usd
        - raw_total_pnl_pct
        - raw_realized_pnl_pct
        - raw_unrealized_pnl_pct
        - realized_pnl_pct
        - total_pnl_pct
        - usd_balance
        - total_volume_usd
        - markets_traded
        - events_traded
        - categories_traded
        - markets_won
        - markets_lost
        - market_win_rate_pct
        - avg_win_usd
        - avg_loss_usd
        - profit_factor
        - total_buys
        - total_sells
        - total_redemptions
        - total_merges
        - total_fees
        - total_wins_usd
        - total_losses_usd
        - best_trade_pnl_usd
        - worst_trade_pnl_usd
        - buy_volume_usd
        - sell_volume_usd
        - redemption_volume_usd
        - merge_volume_usd
        - split_volume_usd
        - total_splits
        - total_converts
        - combo_trade_count
        - maker_rebate_count
        - maker_rebate_usd
        - reward_count
        - reward_usd
        - yield_count
        - yield_usd
        - avg_hold_time_seconds
        - first_trade_at
        - last_trade_at
        - open_positions_value
        - open_position_count
    SortDirection:
      type: string
      enum:
        - asc
        - desc
    TraderPnl:
      type: object
      required:
        - trader
        - realized_pnl_usd
        - open_positions_value
        - events_traded
        - categories_traded
        - markets_traded
        - markets_won
        - markets_lost
        - market_win_rate_pct
        - avg_win_usd
        - avg_loss_usd
        - profit_factor
        - total_buys
        - total_sells
        - total_redemptions
        - total_merges
        - converted_count
        - converted_shares_gained
        - converted_shares_lost
        - total_volume_usd
        - buy_volume_usd
        - sell_volume_usd
        - redemption_volume_usd
        - merge_volume_usd
        - total_fees
        - total_wins_usd
        - total_losses_usd
        - avg_hold_time_seconds
        - maker_rebate_count
        - maker_rebate_usd
        - reward_count
        - reward_usd
        - yield_count
        - yield_usd
        - open_position_count
      properties:
        trader:
          $ref: '#/components/schemas/TraderProfile'
          description: Trader wallet or profile.
        realized_pnl_usd:
          type: number
          format: double
          description: Realized PnL in USD.
        total_pnl_usd:
          type: number
          format: double
          description: Total PnL in USD.
        unrealized_pnl_usd:
          type: number
          format: double
          description: Unrealized PnL in USD.
        usd_balance:
          type: number
          format: double
          description: >-
            Wallet cash held in pUSD + USDC at this point in time. Stable per
            block.
        realized_pnl_pct:
          type:
            - number
            - 'null'
          format: double
          description: Realized PnL percent.
        total_pnl_pct:
          type:
            - number
            - 'null'
          format: double
          description: Total PnL percent.
        open_positions_value:
          type: number
          format: double
          description: Open positions value.
        events_traded:
          type: integer
          format: int64
          description: Events traded.
          minimum: 0
        categories_traded:
          type: integer
          format: int64
          description: Categories traded.
          minimum: 0
        markets_traded:
          type: integer
          format: int64
          description: |-
            Distinct markets (condition_ids) with at least one buy or sell by
            this trader. NOTE: `markets_won + markets_lost` uses a DIFFERENT
            denominator (decided markets — see those fields) and can exceed
            this count: positions acquired without a trade (e.g. NegRisk
            conversions, transfers) never increment `markets_traded` but can
            still produce a win/loss verdict once closed or resolved. These
            fields are not subsets of each other and do not reconcile.
          minimum: 0
        markets_won:
          type: integer
          format: int64
          description: |-
            Markets with a DECIDED winning verdict: the market's position was
            fully closed (sold/redeemed to zero) or resolved, and the summed
            realized PnL for that market is positive. Open/undecided markets
            are not counted; re-entering a market reverses its verdict until
            it is decided again. Denominator differs from `markets_traded`
            (see that field).
          minimum: 0
        markets_lost:
          type: integer
          format: int64
          description: |-
            Markets with a DECIDED losing verdict (summed realized PnL
            negative at close/resolution). See `markets_won` for the
            decided-market semantics.
          minimum: 0
        market_win_rate_pct:
          type: number
          format: double
          description: |-
            `100 × markets_won / (markets_won + markets_lost)` — the
            denominator is DECIDED markets only (won + lost), not
            `markets_traded`. 0 when no market is decided yet.
        avg_win_usd:
          type: number
          format: double
          description: Average win in USD.
        avg_loss_usd:
          type: number
          format: double
          description: Average loss in USD.
        profit_factor:
          type: number
          format: double
          description: Profit factor.
        total_buys:
          type: integer
          format: int64
          description: Total buys.
          minimum: 0
        total_sells:
          type: integer
          format: int64
          description: Total sells.
          minimum: 0
        total_redemptions:
          type: integer
          format: int64
          description: Total redemptions.
          minimum: 0
        total_merges:
          type: integer
          format: int64
          description: Total merges.
          minimum: 0
        total_splits:
          type: integer
          format: int64
          description: Number of split transactions in the selected timeframe.
          minimum: 0
        converted_count:
          type: integer
          format: int64
          description: Converted count.
          minimum: 0
        converted_shares_gained:
          type: number
          format: double
          description: Converted shares gained.
        converted_shares_lost:
          type: number
          format: double
          description: Converted shares lost.
        total_volume_usd:
          type: number
          format: double
          description: Total volume in USD.
        buy_volume_usd:
          type: number
          format: double
          description: Buy volume in USD.
        sell_volume_usd:
          type: number
          format: double
          description: Sell volume in USD.
        redemption_volume_usd:
          type: number
          format: double
          description: Redemption volume in USD.
        merge_volume_usd:
          type: number
          format: double
          description: Merge volume in USD.
        convert_collateral_usd:
          type: number
          format: double
          description: Convert collateral in USD.
        split_volume_usd:
          type: number
          format: double
          description: USD collateral split into outcome tokens in the selected timeframe.
        total_fees:
          type: number
          format: double
          description: Total fees.
        total_wins_usd:
          type: number
          format: double
          description: Total wins in USD.
        total_losses_usd:
          type: number
          format: double
          description: Total losses in USD.
        best_trade_pnl_usd:
          type:
            - number
            - 'null'
          format: double
          description: Best trade PnL in USD.
        best_trade_condition_id:
          type:
            - string
            - 'null'
          description: Best trade condition ID.
        worst_trade_pnl_usd:
          type:
            - number
            - 'null'
          format: double
          description: Worst trade PnL in USD.
        worst_trade_condition_id:
          type:
            - string
            - 'null'
          description: Worst trade condition ID.
        best_trade_metadata:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeMarketRef'
              description: |-
                Market metadata (condition_id, slug, title, question, image_url,
                event_slug) for the market behind the best PnL trade in this
                summary at this timeframe. `null` when no trade qualifies.
        worst_trade_metadata:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeMarketRef'
              description: Market metadata for the market behind the worst PnL trade.
        avg_hold_time_seconds:
          type: number
          format: double
          description: Average hold time seconds.
        first_trade_at:
          type:
            - integer
            - 'null'
          format: int64
          description: First trade at timestamp.
        last_trade_at:
          type:
            - integer
            - 'null'
          format: int64
          description: Last trade at timestamp.
        maker_rebate_count:
          type: integer
          format: int64
          description: Maker rebate count.
          minimum: 0
        maker_rebate_usd:
          type: number
          format: double
          description: Maker rebate in USD.
        reward_count:
          type: integer
          format: int64
          description: Reward count.
          minimum: 0
        reward_usd:
          type: number
          format: double
          description: Reward in USD.
        yield_count:
          type: integer
          format: int64
          description: Yield count.
          minimum: 0
        yield_usd:
          type: number
          format: double
          description: Yield in USD.
        open_position_count:
          type: integer
          format: int64
          description: Open position count.
          minimum: 0
        combo_trade_count:
          type: integer
          format: int64
          description: Number of combo trades executed by this trader.
          minimum: 0
    TraderProfile:
      type: object
      required:
        - address
        - verified_badge
      properties:
        address:
          type: string
          description: Wallet address.
        name:
          type:
            - string
            - 'null'
          description: Name.
        pseudonym:
          type:
            - string
            - 'null'
          description: Pseudonym.
        profile_image:
          type:
            - string
            - 'null'
          description: Profile image.
        x_username:
          type:
            - string
            - 'null'
          description: X username.
        verified_badge:
          type: boolean
          description: Verified badge.
    TradeMarketRef:
      type: object
      description: >-
        Market metadata for the market a trader's best / worst trade landed in.

        Accompanies the existing flat `best_trade_pnl_usd` /
        `worst_trade_pnl_usd`

        numerics on trader / event / category PnL summaries.
      properties:
        condition_id:
          type:
            - string
            - 'null'
          description: Condition ID.
        market_slug:
          type:
            - string
            - 'null'
          description: Market slug.
        title:
          type:
            - string
            - 'null'
          description: Title.
        question:
          type:
            - string
            - 'null'
          description: Question.
        image_url:
          type:
            - string
            - 'null'
          description: Image URL.
        event_slug:
          type:
            - string
            - 'null'
          description: Event slug.

````