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

# Polygon API

> Access real-time Polygon token prices, trading pairs, wallet analytics, and live WebSocket subscriptions through the Codex API.

Polygon is an Ethereum sidechain offering fast, low-cost transactions with a mature DeFi ecosystem. Codex indexes tokens, pairs, and wallet activity across Polygon, giving you full access to trading data on one of the most widely adopted EVM networks.

## Supported Networks

| Network         | Chain ID | Status |
| --------------- | -------- | ------ |
| Polygon Mainnet | `137`    | Live   |

<Tip>
  Filter queries to Polygon by passing `network: 137`.
</Tip>

<Note>
  Codex also supports **Polygon zkEVM** (chain ID `1101`) as a separate network. Use `networkId: 1101` to query Polygon zkEVM data.
</Note>

## Supported APIs

### Token API

* [Get Token Prices on Polygon](/api-reference/queries/gettokenprices) — Retrieve current USD prices for any token
* [Search and Filter Tokens on Polygon](/api-reference/queries/filtertokens) — Discover trending tokens, filter by liquidity, volume, and market cap
* [Get OHLCV Chart Data on Polygon](/api-reference/queries/gettokenbars) — Fetch candlestick price data for any token
* [Get Token Sparklines on Polygon](/api-reference/queries/tokensparklines) — Retrieve sparkline chart data for tokens
* [Get Top Traders for a Token on Polygon](/api-reference/queries/tokentoptraders) — Find the most active traders for any token

### Pair & Trading API

* [Filter Trading Pairs on Polygon](/api-reference/queries/filterpairs) — Search pairs by liquidity, volume, or token
* [Get Detailed Pair Stats on Polygon](/api-reference/queries/getdetailedpairstats) — Fetch comprehensive trading metrics for any pair
* [Get Token Events on Polygon](/api-reference/queries/gettokenevents) — Track buys and sells in real-time
* [List Pairs for a Token on Polygon](/api-reference/queries/listpairsfortoken) — Find all trading pairs for a specific token
* [Get Pair Metadata on Polygon](/api-reference/queries/pairmetadata) — Retrieve metadata for any trading pair

### Wallet API

* [Get Token Holders on Polygon](/api-reference/queries/holders) — Query token holders with balances
* [Get Top 10 Holder Concentration on Polygon](/api-reference/queries/top10holderspercent) — Check how concentrated a token's supply is among top holders
* [Filter Wallets on Polygon](/api-reference/queries/filterwallets) — Discover active traders and smart money wallets
* [Get Wallet Balances on Polygon](/api-reference/queries/balances) — Retrieve token balances for any wallet

### Real-time WebSocket API

* [Subscribe to Price Updates on Polygon](/api-reference/subscriptions/onpriceupdated) — Get real-time token price changes
* [Subscribe to Trade Events on Polygon](/api-reference/subscriptions/oneventscreated) — Stream live swap events for any token
* [Subscribe to Chart Updates on Polygon](/api-reference/subscriptions/onbarsupdated) — Get live candlestick chart data
* [Subscribe to Pair Metadata Updates on Polygon](/api-reference/subscriptions/onpairmetadataupdated) — Track pair metadata changes in real-time

## Try It in the Explorer

Test any Polygon query directly in the [Codex GraphQL Explorer](/explore).
