> ## 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. PredictionTraderMarketRanking input object reference: every field and its type.

## 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](https://docs.codex.io/api-reference/queries/filterpredictiontradermarkets.md): Filters trader-market records using trader, market, event, and ranking criteria.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.