> ## 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.

# RankingDirection

> The order of ranking. Reference for the RankingDirection enum in the Codex API: every value and where it is accepted.

## GraphQL

```
enum RankingDirection {
  ASC
  DESC
}
```

### Used By

**Used as input by**

* [balances](https://docs.codex.io/api-reference/queries/balances.md): Returns list of token balances that a wallet has.
* [categoryTokens](https://docs.codex.io/api-reference/queries/categorytokens.md): Returns the tokens assigned to a category (including its subcategories), with optional `filterTokens`-style filters and rankings applied.
* [eventScopedFilterPredictionMarkets](https://docs.codex.io/api-reference/queries/eventscopedfilterpredictionmarkets.md): Filters prediction markets within a single event and returns structured classification metadata for each market. Use this instead of `filterPredictionMarkets` when you need entrant/segment/ladder details (country codes, period+stat grouping, parsed numeric/date rungs) without re-parsing labels client-side.
* [filterExchanges](https://docs.codex.io/api-reference/queries/filterexchanges.md): Returns a list of exchanges based on a variety of filters.
* [filterLaunchpads](https://docs.codex.io/api-reference/queries/filterlaunchpads.md): Returns a list of launchpads based on a variety of filters.
* [filterNetworks](https://docs.codex.io/api-reference/queries/filternetworks.md): Returns a list of networks based on a variety of filters.
* [filterNetworkWallets](https://docs.codex.io/api-reference/queries/filternetworkwallets.md) *(deprecated)*: Returns a list of wallets with stats narrowed down to a specific network.
* [filterPairs](https://docs.codex.io/api-reference/queries/filterpairs.md): Returns a list of pairs based on a variety of filters.
* [filterPredictionEvents](https://docs.codex.io/api-reference/queries/filterpredictionevents.md): Filters prediction events using optional text, IDs, and ranking criteria.
* [filterPredictionMarkets](https://docs.codex.io/api-reference/queries/filterpredictionmarkets.md): Filters prediction markets using optional text, IDs, event constraints, and ranking criteria.
* [filterPredictionTraderMarkets](https://docs.codex.io/api-reference/queries/filterpredictiontradermarkets.md): Filters trader-market records using trader, market, event, and ranking criteria.
* [filterPredictionTraders](https://docs.codex.io/api-reference/queries/filterpredictiontraders.md): Filters prediction traders using optional text, IDs, and ranking criteria.
* [filterTokens](https://docs.codex.io/api-reference/queries/filtertokens.md): Discover, screen, and rank tokens across every supported network using 100+ on-chain signals: trading activity, liquidity, holder behavior, fee economics, and launchpad lifecycle.
* [filterTokenWallets](https://docs.codex.io/api-reference/queries/filtertokenwallets.md): Returns a list of wallets with stats narrowed down to a specific token.
* [filterWallets](https://docs.codex.io/api-reference/queries/filterwallets.md): Returns a list of wallets based on a variety of filters.
* [getEventLabels](https://docs.codex.io/api-reference/queries/geteventlabels.md): Returns a list of event labels for a pair.
* [getTokenEvents](https://docs.codex.io/api-reference/queries/gettokenevents.md): Returns transactions for a pair.
* [getTokenEventsForMaker](https://docs.codex.io/api-reference/queries/gettokeneventsformaker.md): Returns a list of token events for a given maker (wallet address).
* [holders](https://docs.codex.io/api-reference/queries/holders.md): Returns list of wallets that hold a given token, ordered by holdings descending. Also has the unique count of holders for that token.
* [onFilterTokensUpdated](https://docs.codex.io/api-reference/subscriptions/onfiltertokensupdated.md): Live-streamed filter token updates for the current `filterTokens` result set.
* [predictionEventTopMarketsBars](https://docs.codex.io/api-reference/queries/predictioneventtopmarketsbars.md): Returns bar data for top markets inside a prediction event.
* [tokenTopTraders](https://docs.codex.io/api-reference/queries/tokentoptraders.md): Returns a list of top traders for a given token.


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