Skip to main content
Mobula and Codex cover a similar problem space: real-time token, pair, trade, and wallet data across Solana, EVM, and other chains. Mobula modeled much of its schema and field naming on the same conventions Codex uses, so most of your integration has a close, often near-identical equivalent. This guide maps every Mobula endpoint to its Codex query, subscription, or webhook, 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 migrate the rest of your codebase.

Mental model

Mobula is a REST API with two versions living side by side (/api/1/... and /api/2/...), where the network is a query parameter that changes name between versions (blockchain/blockchains in V1, chainId/chainIds in V2), and most resources have separate endpoints for single vs. batch, token vs. pair, and current vs. historical. 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 numeric networkId parameter on each field. What that means in practice:
  • You stop maintaining two API surfaces. The /api/1/... vs. /api/2/... decision goes away, along with the blockchain=ethereum vs. chainId=evm:1 naming split.
  • Network selection lives next to the data, so the same query covers Solana, Ethereum, Base, BNB, and 80+ networks. No more mapping CAIP-style solana:solana identifiers per call.
  • Multi-token requests stop needing separate multi-* endpoints. GraphQL aliases and array inputs handle batching natively, and you only pay for the fields you request.
  • Real-time data has two delivery options instead of two websocket families. Mobula splits curated streams (wss://api.mobula.io) from raw indexing streams (wss://stream-evm-prod.mobula.io, etc.); Codex gives you WebSocket subscriptions and webhooks, and you can mix them in the same app.
If you’ve never used GraphQL, Learn GraphQL is a 10-minute primer that’s enough to follow the rest of this guide.

Authentication

Mobula uses an Authorization header set to your raw API key (no Bearer prefix) from the Mobula dashboard, against https://api.mobula.io/api/ (or the rate-limited https://demo-api.mobula.io/api/). Codex also uses an Authorization header with your API key from the dashboard, so the header itself barely changes. The difference is network moves from a query parameter to a field argument, and the request body becomes GraphQL.
Mobula
Codex
For browser-facing apps, generate a short-lived JWT with createApiTokens and pass it as Bearer <token>. See Authentication for the full pattern.

Endpoint mapping

The tables cover the Mobula endpoints customers ask about most often, grouped by surface area. Where Mobula splits a concept across V1 and V2, or across single and batch endpoints, the Codex equivalent on the right replaces all of them. Codex network IDs used below: ethereum → 1, solana → 1399811149, base → 8453, bsc → 56, polygon → 137, arbitrum → 42161, optimism → 10, avalanche → 43114.

Prices and market data

Dedicated token safety is coming soon. Today, Codex surfaces safety flags on token (isScam, mintable, freezable, creatorAddress, top10HoldersPercent) and distribution-based risk signals through filterTokens (insider/sniper/bundler/dev held %, potentialScam). A dedicated token contract scanner for deeper scam and honeypot detection, closer to Mobula’s /2/token/security, is in active development. If contract-level security is core to your product, flag those call sites during migration and reach out so we can share timelines.

Pairs and markets

Charts and OHLCV

Trades

Holders and traders

Wallets

Discovery, screening, and launchpads

Most of Mobula’s discovery and screening surface (/1/market/query, /1/search, /2/fast-search, /2/pulse, /1/all, category and trending lookups) collapses into a single Codex query: filterTokens. It is the most flexible endpoint in the API and worth understanding well before you migrate, because it replaces a dozen Mobula call patterns at once. filterTokens takes a set of filters (range or boolean conditions on token attributes), optional rankings (sort by any attribute, ascending or descending), an optional phrase for search, and a network scope. In one request you can filter and rank across 100+ attributes, including:
  • Price and valuation: priceUSD, marketCap, circulatingMarketCap, fdv, and all-time highs/lows (athPrice, atlPrice, athFdv, atlFdv, athCircMc, atlCircMc).
  • Windowed trading stats (5m / 1h / 4h / 12h / 24h): volume*, buyVolume*, sellVolume*, txnCount*, uniqueBuys*, uniqueSells*, change*, high*, low*.
  • Liquidity: liquidity, totalLiquidityUsd.
  • Holders and age: holders, top10HoldersPercent, age, createdAt, lastTransaction.
  • Safety and distribution signals: potentialScam, mintable, freezable, isVerified, insiderHeldPercentage, sniperHeldPercentage, bundlerHeldPercentage, devHeldPercentage, bluechipRatings.
  • Launchpad state: launchpadName, launchpadProtocol, launchpadGraduationPercent, launchpadCompleted, launchpadMigrated.
  • Categories: categories, hasCategory.
For a trending feed, rank by change* or volume; for a new-listings feed, rank by createdAt; for a memecoin screener, filter on launchpad and distribution fields. The same query shape covers all of them. See the Discover Tokens recipe for worked examples.
filterTokens has a real-time twin: onFilterTokensUpdated pushes the live, re-ranked result set for a filter as the market moves, so a screener or trending board stays current without polling. This is the direct replacement for Mobula’s market and pulse-v2 streams when you want a filtered list rather than a single token’s updates.

Utility

Side-by-side examples

The four patterns below are the ones Mobula customers most commonly migrate first. Token addresses are real and queries are runnable.

1. Multi-token price

For a live price feed instead of polling, subscribe to onPricesUpdated.

2. OHLCV chart

Codex supports resolutions from 1-second up to weekly (7D). Sub-minute resolutions (1S-30S) are only populated for the last 24 hours. For live chart updates, layer in the onBarsUpdated subscription. See the Charts recipe for a full Lightweight Charts integration.

3. Token details (metadata + stats + safety)

Mobula splits this across /2/token/details, /2/market/details, and /2/token/security. Codex returns the same picture in a single request.
The Detailed Token Page recipe shows the full pattern Codex customers use to build a token detail screen.

4. Wallet portfolio

Enrich the response with live USD pricing by batching the returned tokenIds into getTokenPrices. For wallet-level PnL and volume, see detailedWalletStats and the Wallets recipe.

Real-time data

Mobula splits real-time data across two websocket families: curated data streams at wss://api.mobula.io (message type of market, trade, ohlcv, holders, balance, pulse-v2, etc.) and raw per-chain indexing streams at wss://stream-evm-prod.mobula.io, wss://stream-sol-prod.mobula.io, and similar. In both, the API key travels in the JSON payload as authorization. Codex gives you the same curated data with two delivery options, and you can use both at once:
  • WebSocket subscriptions: persistent connection, updates pushed inline, API key in the connection auth. Best for dashboards, trading UIs, anything user-facing.
  • Webhooks: Codex calls an HTTP endpoint you control when an event fires. Best for background jobs, alerts, and queue-driven systems.

Gaps

Things Mobula does that Codex doesn’t, and what to do about them:
  • Perpetuals data and execution (/2/perp/*, /2/wallet/positions/perp/*, /1/market/cefi/funding-rate, perp streams). Codex is a spot-trading data API. If your product depends on perp positions, funding rates, or perp execution, keep Mobula for that surface or pair Codex with a perps-native provider.
  • Swap and bridge execution (/2/swap/quoting, /2/swap/send, /2/bridge/*). Codex is read-only market data and does not quote, route, or submit transactions. Keep an execution provider for these.
  • Prediction-market trading (Mobula’s /2/pm/* CLOB order/auth/redeem flow). Codex exposes Polymarket and Kalshi data via filterPredictionEvents and related queries, but not order placement. Keep Mobula (or the venue directly) for trading.
  • Raw transfers and raw transactions (/1/wallet/raw-transactions, /1/wallet/token-transfers, /1/wallet/nft-transfers, raw transfer streams). Codex returns swap and token-lifecycle events, not arbitrary transfers. Combine Codex with an RPC provider or an Etherscan-family API if transfer history is core to your product.
  • Wallet intelligence (/2/wallet/funding funding-source tracing, /2/wallet/deployer, /2/wallet/labels and /labels/search entity labels). Codex discovers wallets by onchain behavior and performance (filterWallets), not curated identity/entity labels.
  • DeFi protocol positions (/2/wallet/defi-positions). Codex tracks token balances and swap activity, not staking, lending, or LP positions inside DeFi protocols. Pair with a DeFi-positions provider (Zapper, Zerion, DeBank) if this is core to your product.
  • NFT data (/1/market/nft, /1/wallet/nfts, /1/metadata/nfts). Codex does not expose NFT collection or holdings data.
  • CeFi / CEX data (CeFi funding rates, CEX-inclusive market details). Codex is onchain-only.
  • Global market aggregates (/1/market/total, /1/market/token-vs-market, editorial /1/metadata/news). No first-class equivalent; Codex is per-token/per-pair onchain data.
  • Single-call all-chain portfolio aggregation (fetchAllChains, /1/wallet/multi-portfolio rollups). Codex’s balances takes an array of networks, so you can span chains in one query, but very large multi-chain rollups may need pagination per network.
  • Native-token balances on chains without traces. balances returns ERC-20/SPL holdings on every supported network, but native-token amounts on EVM chains require traces support. Flag any integration that relies on native-token portfolio values on a chain without traces.

What you pick up

Things Codex offers that Mobula’s data API doesn’t:
  • One query, many shapes. GraphQL lets you combine token metadata, price, holders, recent trades, and chart data into a single request and only pull the fields you render. A typical Mobula-powered token page hits three or four endpoints across V1 and V2; the Codex equivalent is one.
  • One API surface, not two. No /api/1/... vs. /api/2/... split and no blockchain vs. chainId naming drift. Network is a single numeric networkId everywhere.
  • One endpoint for almost any discovery need. filterTokens filters and ranks across 100+ attributes (price, market cap, FDV, ATH/ATL, windowed volume and trade counts, liquidity, holders, age, launchpad state, and scam/distribution signals) in a single query, and does phrase search. It collapses Mobula’s /1/market/query, /1/search, /2/fast-search, /2/pulse, /1/all, and category/trending endpoints into one field. Its subscription twin onFilterTokensUpdated streams the same re-ranked list live.
  • Multi-timeframe stats in a single call. getDetailedTokenStats and getDetailedPairStats return volume, buys, sells, price change, and unique-maker counts across every window from 5-minute to daily and weekly at once, each with its own change value. No per-timeframe endpoint fan-out.
  • Sub-second chart resolution. getTokenBars and getBars go from 1-second candles up to weekly (7D), so high-frequency trading UIs and low-latency charts work off the same API as daily views.
  • Prediction markets across venues. Codex covers both Polymarket and Kalshi (Mobula’s data is Polymarket-only), including event, market, trade, and trader-level analytics like leaderboards, PnL, and holdings via the filterPredictionEvents and filterPredictionTraders families. See Prediction Markets.
  • Launchpad lifecycle data. First-class support for pump.fun, LetsBonk, Believe, and other launchpads, including bonding-curve state, graduation, and migration events. Mobula surfaces new/bonding pools through Pulse, but Codex models the full lifecycle as queryable and streamable events. See Launchpads.
  • Wallet discovery by performance. filterWallets lets you query for wallets matching specific PnL, win-rate, or trading-volume criteria across all networks, not just for a single token. This is the smart-money surface Mobula’s label lookups don’t cover.
  • Liquidity locks. liquidityLocks surfaces locked-LP context across major EVM chains and Solana, so you can tell a genuinely locked pool from an exit-liquidity trap.
  • Webhooks alongside subscriptions. Push real-time data to your servers without holding open a WebSocket, and mix both in one app. Configure via createWebhooks.
  • 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 Mobula integrations span dozens of call sites: a price service here, a chart loader there, a portfolio screen, a websocket handler. Hand the prompt below to an IDE agent (Claude Code, Cursor, Codex CLI, or similar), run it from the repo root, and it will discover every Mobula touchpoint, 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.
Last modified on August 31, 2026