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

# PredictionTraderMarketRanking

> A ranking to apply when sorting trader-market records.

<div data-generated>
  ## GraphQL

  ```
  input PredictionTraderMarketRanking {
    attribute: PredictionTraderMarketRankingAttribute!
    direction: RankingDirection
  }

  enum PredictionTraderMarketRankingAttribute {
    timestamp
    firstTradeTimestamp
    lastTradeTimestamp
    totalRealizedPnlUsd
    totalRealizedPnlCT
    totalVolumeUsd
    totalVolumeCT
    totalVolumeShares
    totalBuys
    totalSells
    totalTrades
    totalCostBasisUsd
    totalCostBasisCT
    totalSharesHeld
    pnlPerVolumeMarket
    profitPerTradeUsd
    outcome0RealizedPnlUsd
    outcome0Buys
    outcome0Sells
    outcome0SharesHeld
    outcome0CostBasisUsd
    outcome1RealizedPnlUsd
    outcome1Buys
    outcome1Sells
    outcome1SharesHeld
    outcome1CostBasisUsd
  }

  enum RankingDirection {
    ASC
    DESC
  }
  ```

  ### Used By

  **Used as input by**

  * [filterPredictionTraderMarkets](/api-reference/queries/filterpredictiontradermarkets.md): Filters trader-market records using trader, market, event, and ranking criteria.
</div>
