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

# StarkNet API

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

Ethereum L2 validity rollup using zk-STARK proofs for scalability and security. Codex provides token, pair, and trading data for StarkNet's native DeFi ecosystem built with Cairo smart contracts.

## Supported Networks

| Network | Chain ID | Status |
| - | - | - |
| StarkNet | `57420037` | Live |

> [!TIP]
>
> Filter queries to StarkNet by passing `network: 57420037`.

> [!NOTE]
>
> StarkNet uses Cairo smart contracts and zk-STARK proofs. Address formats differ from EVM chains.

## Indexed DEXes

Codex indexes Ekubo and JediSwap V1 on StarkNet. Other StarkNet DEXes and launchpads are not indexed yet.

> [!TIP]
>
> When you call [`getTokenEvents`](https://docs.codex.io/api-reference/queries/gettokenevents) on StarkNet, always pass `quoteToken` so prices are quoted against the token you expect.

## Supported APIs

### Token API

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

### Pair & Trading API

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

### Wallet API

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

### Real-time WebSocket API

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

## Try It in the Explorer

Test any StarkNet query directly in the [Codex GraphQL Explorer](https://docs.codex.io/explore.md).


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