Skip to main content
Dune is sunsetting Sim on August 1, 2026 and pointing customers at three alternatives, Codex among them. This guide maps every Sim endpoint to its closest Codex equivalent, shows working side-by-side examples for the most common patterns, and ends with a copy-paste prompt you can hand to an LLM to translate the rest of your integration.
Sim’s documentation will go offline alongside the API. If you’re reading this after August 1, 2026, the Sim endpoint paths and parameters referenced here are historical.

Mental model

Sim is a REST API, organized by chain family (EVM, SVM), with one resource per URL. Codex is a single GraphQL Supergraph: one endpoint (https://graph.codex.io/graphql), one auth header, one query language, and the network is just a parameter on each query (networkId: Int on most queries, networks: [Int!] on balances). Most patterns that took two or three Sim calls collapse into a single Codex query. A few practical consequences:
  • You don’t need different code paths per chain. Codex covers Ethereum, Solana, and 100+ networks under the same schema.
  • Real-time data is first-class. Anything available as a query usually has a matching GraphQL subscription over WebSocket, plus an option to fan out to your servers via webhooks.
  • You request only the fields you need, so payloads are usually smaller than the equivalent Sim response.
If you’ve never used GraphQL, Learn GraphQL is a 10-minute primer that’s enough to follow the rest of this guide.

Authentication

Sim uses an X-Sim-Api-Key header. Codex uses an Authorization header with your API key from the dashboard.
Sim
Codex
If you serve requests from a browser, generate a short-lived JWT with createApiTokens (a Growth or Enterprise plan feature) and pass it as Bearer <token> (see Authentication for the full pattern).

Endpoint mapping

Plan requirements. A few of the mappings above need a Growth or Enterprise plan: balances, holders, liquidityMetadata, every WebSocket subscription, and the createWebhooks and createApiTokens mutations. The rest, including getTokenEventsForMaker, token, getTokenPrices, filterTokens, getNetworks, and top10HoldersPercent, don’t carry that requirement. Check the dashboard for your plan’s current limits.

Side-by-side examples

The four patterns below cover most Sim integrations. Token addresses and the wallet (vitalik.eth’s resolved address) are real and the queries are runnable in our Explorer. Codex’s balances does not resolve ENS names, so always pass the raw address.

1. Wallet balances

USD pricing is returned inline: balanceUsd and tokenPriceUsd come back on each item, so most Sim integrations that hit /v1/evm/balances and read value_usd only need one Codex call, not two. Reach for getTokenPrices only when you need historical prices, a specific pool, or per-block pricing (capped at 25 inputs per request). If balances feel stale (Codex caches them), call the refreshBalances mutation first.

2. Wallet activity

Sim’s activity feed filters by activity_type across send, receive, mint, burn, swap, approve, call, and transfer. Codex’s getTokenEventsForMaker returns DEX-only events (Swap, Mint, Burn, Sync, Collect, CollectProtocol, PoolBalanceChanged, LiquidityLock) and exposes the same set as an eventType filter on the query. If your Sim integration is mostly swap, the port is one-for-one. If it leans on approve / call or NFT moves, see “Gaps” below.
For a live feed instead of polling, swap the query for the onEventsCreatedByMaker subscription over WebSocket.

3. Token holders

A few things to note: Codex token IDs are address:networkId, and the holders response also returns a top10HoldersPercent field alongside items if you only need the concentration metric. There’s also a standalone top10HoldersPercent query that takes a token ID directly. Page sizes differ: Sim’s token-holders defaults to and caps at 500 per page, while Codex’s limit defaults to 50 and maxes at 200, so a naïve copy of the request will shrink your pages by up to 10× until you adjust pagination.

4. Token info and price

The two fields are returned by a single GraphQL request. Codex’s response also carries safety signals and launchpad context that Sim’s token-info doesn’t expose: isScam everywhere, plus mintable and freezable (the actual authority addresses, or null) on Solana SPL tokens.

Real-time data

Sim ships real-time updates exclusively through webhooks. Codex gives you two ways to consume the same events, and you can mix them in the same app:
  • WebSocket subscriptions: a persistent connection delivers updates inline. Good for dashboards, trading UIs, anything user-facing. See Subscriptions.
  • Webhooks: Codex calls an HTTP endpoint you own when an event fires. Good for background jobs, alerts, server-to-server fan-out. See Webhooks and the createWebhooks mutation.
Common Sim webhook patterns and their Codex equivalents:

Gaps

A few things Sim does that Codex doesn’t, and what to do about them:
  • NFTs (ERC-721 / ERC-1155 collectibles). Codex is a fungible-token API. If NFT data is core to your product, you’ll want to combine Codex with a dedicated NFT provider (Alchemy, Reservoir, OpenSea).
  • Aggregated per-wallet DeFi positions. Codex exposes pair-level liquidity via liquidityMetadata and liquidityMetadataByToken, but not “this wallet holds these LP positions across these protocols.” Zerion and DeBank are the usual fill-ins here.
  • Raw transaction-level data and decoded contract calls. Codex returns trading events, not every transaction a wallet ever sent. If you need full tx history, pair Codex with an RPC provider or Etherscan-family API.
  • Dedicated stablecoin endpoint. Use filterTokens with a maintained list of stablecoin addresses.

What you pick up

Capabilities Codex offers that Sim didn’t:
  • One query, many shapes. GraphQL lets you combine token metadata, price, holders, and recent trades into a single request and only pull the fields you render.
  • Live charting data. OHLCV bars via getBars and getTokenBars, and live updates with onBarsUpdated. Sim didn’t ship a charting endpoint.
  • Wallet PnL and trader discovery. filterWallets, detailedWalletStats, and walletChart power discovery of profitable traders, with realized profit, swap counts, win/loss tallies, and per-network breakdowns. Available on Growth and Enterprise plans. See the Wallets recipe.
  • Launchpad lifecycle data. Native support for pump.fun and other launchpads, including graduation status, bonding curves, and migration events. See Launchpads.
  • Prediction markets. Polymarket and Kalshi data via the filterPredictionEvents family. See the Prediction Markets section.
  • Pair-level data. Codex has first-class concepts of trading pairs, exchanges, and liquidity locks (Sim is wallet- and token-centric only).
  • Built for AI agents. A docs MCP server, prebuilt Codex Skills for Claude/Cursor/Codex CLI, and pay-per-query access via MPP.

AI migration prompt

Most teams don’t migrate one file at a time. They hand the whole codebase to an IDE agent (Claude Code, Cursor, Codex CLI, or similar) and tell it to do the job. The prompt below is written for that: drop it in your agent of choice, run it from the repo root, and it will discover Sim usage, propose a plan, and execute the migration with your approval.
Pair this prompt with our Codex Skills and docs MCP server so the agent can look up Codex queries on demand instead of guessing at field names.

Getting help

  • Browse the API Reference for the full schema.
  • Skim the Recipes for end-to-end examples that solve specific product problems.
  • Ask in our community if you hit a wall during migration. We’re actively supporting Sim customers through August 1.