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

# Mobula to Codex

> Move your Mobula integration to Codex

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](https://docs.codex.io/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](/concepts/subscriptions) and [webhooks](/concepts/webhooks), and you can mix them in the same app.

If you've never used GraphQL, [Learn 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](https://admin.mobula.io), 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](https://dashboard.codex.io?utm_source=codex\&utm_medium=docs\&utm_campaign=migrations-mobula), 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.

```bash Mobula theme={null}
curl "https://api.mobula.io/api/1/market/data?asset=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&blockchain=ethereum" \
  -H "Authorization: $MOBULA_API_KEY"
```

```bash Codex theme={null}
curl https://graph.codex.io/graphql \
  -H "Authorization: $CODEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"{ getTokenPrices(inputs: [{ address: \"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2\", networkId: 1 }]) { priceUsd timestamp address } }"}'
```

For browser-facing apps, generate a short-lived JWT with [`createApiTokens`](/api-reference/mutations/createapitokens) and pass it as `Bearer <token>`. See [Authentication](/concepts/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

| Mobula                                                      | Codex equivalent                                                                                                                                 | Notes                                                                                                                                                                         |
| :---------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GET /1/market/data`                                        | [`getTokenPrices`](/api-reference/queries/gettokenprices) + [`getDetailedTokenStats`](/api-reference/queries/getdetailedtokenstats)              | Single-asset price and market stats. Metadata via [`token`](/api-reference/queries/token).                                                                                    |
| `GET /1/market/multi-data`                                  | [`getTokenPrices`](/api-reference/queries/gettokenprices)                                                                                        | Native batch input; pass an array. Enrich with [`tokens`](/api-reference/queries/tokens) for metadata.                                                                        |
| `GET /1/market/multi-prices`, `POST /1/market/multi-prices` | [`getTokenPrices`](/api-reference/queries/gettokenprices)                                                                                        | Max 25 inputs per call (anything over is truncated); chunk larger batches.                                                                                                    |
| `GET /2/token/price`, `POST /2/token/price`                 | [`getTokenPrices`](/api-reference/queries/gettokenprices)                                                                                        | Current USD price for a token.                                                                                                                                                |
| `GET /2/token/price-at`, `POST /2/token/price-at`           | [`getTokenPrices`](/api-reference/queries/gettokenprices) with a `timestamp` input                                                               | Pass the unix timestamp on the input to get the price at that moment.                                                                                                         |
| `GET /2/market/details`, `POST /2/market/details`           | [`getDetailedTokenStats`](/api-reference/queries/getdetailedtokenstats) or [`getDetailedPairStats`](/api-reference/queries/getdetailedpairstats) | Token-level vs. pair-level stats depending on whether you pass a token or a pool address.                                                                                     |
| `GET /2/token/details`, `POST /2/token/details`             | [`token`](/api-reference/queries/token) + [`getDetailedTokenStats`](/api-reference/queries/getdetailedtokenstats)                                | One GraphQL request returns metadata, stats, safety, and launchpad context.                                                                                                   |
| `GET /2/asset/details`, `POST /2/asset/details`             | [`token`](/api-reference/queries/token)                                                                                                          | Asset-level metadata.                                                                                                                                                         |
| `GET /1/market/sparkline`                                   | [`tokenSparklines`](/api-reference/queries/tokensparklines)                                                                                      | Compact price series for sparkline UIs.                                                                                                                                       |
| `GET /2/token/ath`, `POST /2/token/ath`                     | [`filterTokens`](/api-reference/queries/filtertokens)                                                                                            | ATH/ATL are first-class: `athPrice`, `atlPrice`, `athFdv`, `atlFdv`, `athCircMc`, `atlCircMc` are filterable and returnable attributes.                                       |
| `GET /2/market/lighthouse`                                  | [`filterTokens`](/api-reference/queries/filtertokens) + [`getDetailedTokenStats`](/api-reference/queries/getdetailedtokenstats)                  | No single "quality score", but `filterTokens` exposes the raw signals (holder concentration, insider/sniper/bundler held %, `potentialScam`, liquidity, volume) to build one. |

### Token metadata and search

| Mobula                                                       | Codex equivalent                                                                                | Notes                                                                                                                                                                                                                                                                                        |
| :----------------------------------------------------------- | :---------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GET /1/metadata`                                            | [`token`](/api-reference/queries/token)                                                         | Metadata, social links, and image URLs on one object.                                                                                                                                                                                                                                        |
| `GET /1/multi-metadata`                                      | [`tokens(ids: [{ address, networkId }])`](/api-reference/queries/tokens)                        | Batch token metadata.                                                                                                                                                                                                                                                                        |
| `GET /1/all`                                                 | [`filterTokens`](/api-reference/queries/filtertokens)                                           | Codex doesn't dump the full asset universe; filter to what you need.                                                                                                                                                                                                                         |
| `GET /1/blockchains`                                         | [`getNetworks`](/api-reference/queries/getnetworks)                                             | Returns the `networkId`s you use everywhere else.                                                                                                                                                                                                                                            |
| `GET /1/search`, `GET /2/fast-search`, `POST /2/fast-search` | [`filterTokens(phrase: ...)`](/api-reference/queries/filtertokens)                              | Use `$SYMBOL` for exact symbol matches; combine with rankings and filters.                                                                                                                                                                                                                   |
| `GET /2/token/security`                                      | [`token`](/api-reference/queries/token) + [`filterTokens`](/api-reference/queries/filtertokens) | Safety flags (`isScam`, `mintable`, `freezable`, `creatorAddress`, `top10HoldersPercent`) are inline on `token`; deeper distribution signals (insider/sniper/bundler/dev held %, `potentialScam`) are `filterTokens` attributes. Dedicated contract scanning is on the way (see note below). |
| `GET /2/token/logo-reuses`                                   | Partial via [`filterTokens`](/api-reference/queries/filtertokens)                               | No logo-fingerprint match, but `potentialScam`, `isScam`, and holder-concentration signals cover the common scam-detection use case.                                                                                                                                                         |
| `GET /1/metadata/categories`                                 | [`filterTokens`](/api-reference/queries/filtertokens)                                           | Category surfaces map to filters/rankings rather than a taxonomy dump.                                                                                                                                                                                                                       |
| `GET /1/metadata/news`                                       | Not supported                                                                                   | Codex is market/onchain data, not editorial news.                                                                                                                                                                                                                                            |

<Note>
  **Dedicated token safety is coming soon.** Today, Codex surfaces safety flags on [`token`](/api-reference/queries/token) (`isScam`, `mintable`, `freezable`, `creatorAddress`, `top10HoldersPercent`) and distribution-based risk signals through [`filterTokens`](/api-reference/queries/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.
</Note>

### Pairs and markets

| Mobula                                        | Codex equivalent                                                                                                                                          | Notes                                                                                                                                 |
| :-------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------ |
| `GET /1/market/pair`                          | [`getDetailedPairStats`](/api-reference/queries/getdetailedpairstats)                                                                                     | Pair-level trade stats (volume, buys/sells, price change). Static metadata via [`pairMetadata`](/api-reference/queries/pairmetadata). |
| `GET /1/market/pairs`, `GET /2/token/markets` | [`listPairsForToken`](/api-reference/queries/listpairsfortoken) + [`listPairsWithMetadataForToken`](/api-reference/queries/listpairswithmetadatafortoken) | All venues for a token.                                                                                                               |
| `GET /1/market/blockchain/pairs`              | [`filterPairs`](/api-reference/queries/filterpairs)                                                                                                       | Discover and rank pairs across a network with filters and sorting.                                                                    |
| `GET /1/market/blockchain/stats`              | [`getNetworkStats`](/api-reference/queries/getnetworkstats)                                                                                               | Per-network trading activity.                                                                                                         |

### Charts and OHLCV

| Mobula                                                                                      | Codex equivalent                                      | Notes                                                               |
| :------------------------------------------------------------------------------------------ | :---------------------------------------------------- | :------------------------------------------------------------------ |
| `GET /1/market/history`                                                                     | [`getTokenBars`](/api-reference/queries/gettokenbars) | Token-level OHLCV including volume.                                 |
| `GET /1/market/multi-history`                                                               | [`getTokenBars`](/api-reference/queries/gettokenbars) | One call per token; GraphQL aliases batch them in a single request. |
| `GET /2/token/price-history`, `POST /2/token/price-history`, `GET /2/asset/price-history`   | [`getTokenBars`](/api-reference/queries/gettokenbars) | Token/asset price series.                                           |
| `GET /2/token/ohlcv-history`, `POST /2/token/ohlcv-history`                                 | [`getTokenBars`](/api-reference/queries/gettokenbars) | Codex supports 1-second up to weekly (`7D`) resolutions.            |
| `GET /1/market/history/pair`, `GET /2/market/ohlcv-history`, `POST /2/market/ohlcv-history` | [`getBars`](/api-reference/queries/getbars)           | Pair-scoped OHLCV; use `quoteToken` to invert the pair.             |

### Trades

| Mobula                                                          | Codex equivalent                                                                                                              | Notes                                                                                   |
| :-------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- |
| `GET /2/token/trades`, `POST /2/token/trades`                   | [`getTokenEvents`](/api-reference/queries/gettokenevents)                                                                     | Swap events for a token; filter by USD size, direction, and time range.                 |
| `GET /2/token/trades-enriched`, `POST /2/token/trades-enriched` | [`getTokenEvents`](/api-reference/queries/gettokenevents) + [`filterTokenWallets`](/api-reference/queries/filtertokenwallets) | Codex returns maker addresses on events; join per-wallet PnL from `filterTokenWallets`. |
| `GET /2/token/trade`                                            | [`getTokenEvents`](/api-reference/queries/gettokenevents)                                                                     | Filter to a single transaction hash.                                                    |
| `GET /1/market/trades/pair`                                     | [`getTokenEvents`](/api-reference/queries/gettokenevents)                                                                     | Pass the pair address in `query: { address: ... }`.                                     |
| `GET /2/trades/filters`                                         | [`getTokenEvents`](/api-reference/queries/gettokenevents)                                                                     | Bulk trade pulls with the same filter set.                                              |

### Holders and traders

| Mobula                                                            | Codex equivalent                                                                                                | Notes                                                                                           |
| :---------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- |
| `GET /2/token/holder-positions`, `POST /2/token/holder-positions` | [`holders`](/api-reference/queries/holders) + [`filterTokenWallets`](/api-reference/queries/filtertokenwallets) | `holders` for the ranked balance list; `filterTokenWallets` for per-token PnL/position ranking. |
| `GET /2/token/trader-positions`, `POST /2/token/trader-positions` | [`tokenTopTraders`](/api-reference/queries/tokentoptraders)                                                     | Top buyers/sellers/PnL for a token.                                                             |
| `GET /1/token/first-buyers`                                       | Partial via [`getTokenEvents`](/api-reference/queries/gettokenevents)                                           | Approximate from the earliest events for a token; no curated first-buyers surface.              |

### Wallets

| Mobula                                                                          | Codex equivalent                                                                                                                        | Notes                                                                                                                                              |
| :------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GET /1/wallet/portfolio`, `GET /2/wallet/holdings`, `POST /2/wallet/holdings`  | [`balances`](/api-reference/queries/balances)                                                                                           | Wallet portfolio with prices. Native balances on EVM chains require traces support. `networks` is an array, so one query can span multiple chains. |
| `GET /1/wallet/multi-portfolio`                                                 | [`balances`](/api-reference/queries/balances)                                                                                           | Alias multiple wallets in one GraphQL request.                                                                                                     |
| `GET /1/wallet/history`                                                         | [`walletChart`](/api-reference/queries/walletchart)                                                                                     | Net worth / PnL over time; resolutions `60`, `240`, `1D`, `7D`.                                                                                    |
| `GET /2/wallet/positions`, `POST /2/wallet/positions`, `GET /2/wallet/position` | [`detailedWalletStats`](/api-reference/queries/detailedwalletstats) + [`filterTokenWallets`](/api-reference/queries/filtertokenwallets) | Aggregate PnL/volume from `detailedWalletStats`; per-token positions from `filterTokenWallets`.                                                    |
| `GET /2/wallet/positions-history`, `GET /2/wallet/position-history`             | [`walletChart`](/api-reference/queries/walletchart)                                                                                     | Historical PnL/value curve.                                                                                                                        |
| `GET /2/wallet/analysis`                                                        | [`detailedWalletStats`](/api-reference/queries/detailedwalletstats)                                                                     | Win rate, PnL, swap counts, volume.                                                                                                                |
| `GET /1/wallet/trades`, `GET /2/wallet/trades`, `POST /2/wallet/trades`         | [`getTokenEventsForMaker`](/api-reference/queries/gettokeneventsformaker)                                                               | Swap events for a wallet; filter by token if needed.                                                                                               |
| `GET /2/wallet/activity`, `POST /2/wallet/activity`                             | [`getTokenEventsForMaker`](/api-reference/queries/gettokeneventsformaker)                                                               | Codex returns swap and lifecycle activity, not arbitrary transfers.                                                                                |
| `GET /1/wallet/transactions`                                                    | [`getTokenEventsForMaker`](/api-reference/queries/gettokeneventsformaker)                                                               | Swap events; raw transfers are not exposed (see Gaps).                                                                                             |
| `POST /1/wallet/labels`, `GET /2/wallet/labels`, `GET /2/wallet/labels/search`  | Partial via [`filterWallets`](/api-reference/queries/filterwallets)                                                                     | Codex discovers wallets by behavior/performance rather than curated entity labels.                                                                 |
| `GET /2/wallet/defi-positions`                                                  | Not supported                                                                                                                           | Codex tracks token balances and swaps, not DeFi protocol positions (staking, lending, LP). See Gaps.                                               |

### 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`](/api-reference/queries/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](/recipes/discover-tokens) for worked examples.

<Tip>
  `filterTokens` has a real-time twin: [`onFilterTokensUpdated`](/api-reference/subscriptions/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.
</Tip>

| Mobula                                                       | Codex equivalent                                                                         | Notes                                                                                                                                                                                                                                                                       |
| :----------------------------------------------------------- | :--------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GET /1/market/query`, `GET /1/all`                          | [`filterTokens`](/api-reference/queries/filtertokens)                                    | Screener-style filtering and ranking in one query.                                                                                                                                                                                                                          |
| `GET /1/search`, `GET /2/fast-search`, `POST /2/fast-search` | [`filterTokens(phrase: ...)`](/api-reference/queries/filtertokens)                       | Search is a `phrase` argument on the same endpoint; use `$SYMBOL` for exact symbol matches.                                                                                                                                                                                 |
| `GET /2/pulse`, `POST /2/pulse`, `GET /1/pulse`              | [`filterTokens`](/api-reference/queries/filtertokens) + [launchpad context](/launchpads) | Filter on launchpad fields for new/bonding/bonded discovery (pump.fun, LetsBonk, Believe, etc.). Stream via [`onFilterTokensUpdated`](/api-reference/subscriptions/onfiltertokensupdated) or [`onLaunchpadTokenEvent`](/api-reference/subscriptions/onlaunchpadtokenevent). |
| `GET /2/token/dev-history`                                   | Partial via [`getTokenEventsForMaker`](/api-reference/queries/gettokeneventsformaker)    | Query the deployer address as a maker; no dedicated deployer-history endpoint.                                                                                                                                                                                              |

### Utility

| Mobula                                    | Codex equivalent                                                                                   | Notes                                                                         |
| :---------------------------------------- | :------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| `GET /1/blockchains`                      | [`getNetworks`](/api-reference/queries/getnetworks)                                                | Network catalog with `networkId`s.                                            |
| `GET /2/usage`                            | Codex usage in the [dashboard](https://dashboard.codex.io)                                         | Credit and request metering live in the dashboard.                            |
| `GET /metadata`, `GET /2/system-metadata` | [`getNetworks`](/api-reference/queries/getnetworks) + [API Reference](/api-reference/introduction) | System-level config is exposed per-resource rather than in one metadata blob. |

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

<CodeGroup>
  ```bash Mobula theme={null}
  curl "https://api.mobula.io/api/1/market/multi-data?assets=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0xdac17f958d2ee523a2206206994597c13d831ec7&blockchains=ethereum,ethereum" \
    -H "Authorization: $MOBULA_API_KEY"
  ```

  ```typescript Codex SDK theme={null}
  import { Codex } from "@codex-data/sdk"

  const sdk = new Codex(process.env.CODEX_API_KEY!)

  const { getTokenPrices } = await sdk.queries.getTokenPrices({
    inputs: [
      { address: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", networkId: 1 },
      { address: "0xdac17f958d2ee523a2206206994597c13d831ec7", networkId: 1 },
    ],
  })

  getTokenPrices.forEach((p) => console.log(p.address, p.priceUsd))
  ```

  ```graphql Codex GraphQL theme={null}
  query MultiPrice {
    getTokenPrices(
      inputs: [
        { address: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", networkId: 1 }
        { address: "0xdac17f958d2ee523a2206206994597c13d831ec7", networkId: 1 }
      ]
    ) {
      address
      networkId
      priceUsd
      timestamp
    }
  }
  ```
</CodeGroup>

For a live price feed instead of polling, subscribe to [`onPricesUpdated`](/api-reference/subscriptions/onpricesupdated).

### 2. OHLCV chart

<CodeGroup>
  ```bash Mobula theme={null}
  curl "https://api.mobula.io/api/2/token/ohlcv-history?address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&chainId=evm:1&period=1h&from=1716595200&to=1717200000" \
    -H "Authorization: $MOBULA_API_KEY"
  ```

  ```graphql Codex GraphQL theme={null}
  query TokenChart {
    getTokenBars(
      symbol: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2:1"
      from: 1716595200
      to: 1717200000
      resolution: "60"
    ) {
      t
      o
      h
      l
      c
      volume
    }
  }
  ```
</CodeGroup>

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`](/api-reference/subscriptions/onbarsupdated) subscription. See the [Charts recipe](/recipes/charts) 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.

<CodeGroup>
  ```bash Mobula theme={null}
  curl "https://api.mobula.io/api/2/token/details?address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&chainId=evm:1" \
    -H "Authorization: $MOBULA_API_KEY"

  curl "https://api.mobula.io/api/2/token/security?address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&chainId=evm:1" \
    -H "Authorization: $MOBULA_API_KEY"
  ```

  ```graphql Codex GraphQL theme={null}
  query TokenDetails {
    token(input: { address: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", networkId: 1 }) {
      name
      symbol
      decimals
      address
      isScam
      mintable
      freezable
      creatorAddress
      createdAt
      top10HoldersPercent
      info {
        circulatingSupply
        totalSupply
        imageLargeUrl
        description
      }
      socialLinks {
        twitter
        telegram
        discord
        website
      }
      launchpad {
        launchpadName
        graduationPercent
        completed
      }
    }
    getDetailedTokenStats(
      tokenAddress: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
      networkId: 1
      durations: [day1]
    ) {
      stats_day1 {
        statsUsd {
          volume {
            currentValue
            change
          }
          close {
            currentValue
            change
          }
        }
        statsNonCurrency {
          transactions {
            currentValue
          }
          buys {
            currentValue
          }
          sells {
            currentValue
          }
        }
      }
    }
  }
  ```
</CodeGroup>

The [Detailed Token Page recipe](/recipes/detailed-token-page) shows the full pattern Codex customers use to build a token detail screen.

### 4. Wallet portfolio

<CodeGroup>
  ```bash Mobula theme={null}
  curl "https://api.mobula.io/api/1/wallet/portfolio?wallet=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045&blockchains=ethereum" \
    -H "Authorization: $MOBULA_API_KEY"
  ```

  ```graphql Codex GraphQL theme={null}
  query WalletPortfolio {
    balances(
      input: {
        walletAddress: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
        networks: [1]
        removeScams: true
      }
    ) {
      items {
        tokenId
        shiftedBalance
        balanceUsd
        tokenPriceUsd
      }
      cursor
    }
  }
  ```
</CodeGroup>

Enrich the response with live USD pricing by batching the returned `tokenId`s into [`getTokenPrices`](/api-reference/queries/gettokenprices). For wallet-level PnL and volume, see [`detailedWalletStats`](/api-reference/queries/detailedwalletstats) and the [Wallets recipe](/recipes/wallets).

## 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](/concepts/subscriptions): persistent connection, updates pushed inline, API key in the connection auth. Best for dashboards, trading UIs, anything user-facing.
* [Webhooks](/concepts/webhooks): Codex calls an HTTP endpoint you control when an event fires. Best for background jobs, alerts, and queue-driven systems.

| Mobula stream                                     | Codex subscription                                                                                                                                                                                                                                                                                                           | Codex webhook                                                                                                       |
| :------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------ |
| `market`, `market-pair` (price)                   | [`onPriceUpdated`](/api-reference/subscriptions/onpriceupdated), [`onPricesUpdated`](/api-reference/subscriptions/onpricesupdated)                                                                                                                                                                                           | Price webhook                                                                                                       |
| `market-details`, `token-details`                 | [`onDetailedTokenStatsUpdated`](/api-reference/subscriptions/ondetailedtokenstatsupdated)                                                                                                                                                                                                                                    |                                                                                                                     |
| `ohlcv`                                           | [`onBarsUpdated`](/api-reference/subscriptions/onbarsupdated)                                                                                                                                                                                                                                                                |                                                                                                                     |
| `trade`, `fast-trade`                             | [`onTokenEventsCreated`](/api-reference/subscriptions/ontokeneventscreated), [`onEventsCreated`](/api-reference/subscriptions/oneventscreated)                                                                                                                                                                               | Token swap webhook                                                                                                  |
| `position`, `positions` (by wallet)               | [`onEventsCreatedByMaker`](/api-reference/subscriptions/oneventscreatedbymaker)                                                                                                                                                                                                                                              | Token swap webhook (maker filter)                                                                                   |
| `holders`                                         | [`onHoldersUpdated`](/api-reference/subscriptions/onholdersupdated)                                                                                                                                                                                                                                                          |                                                                                                                     |
| `balance`                                         | [`onBalanceUpdated`](/api-reference/subscriptions/onbalanceupdated)                                                                                                                                                                                                                                                          |                                                                                                                     |
| `pulse-v2` (launchpad discovery)                  | [`onFilterTokensUpdated`](/api-reference/subscriptions/onfiltertokensupdated), [`onLaunchpadTokenEvent`](/api-reference/subscriptions/onlaunchpadtokenevent), [`onTokenLifecycleEventsCreated`](/api-reference/subscriptions/ontokenlifecycleeventscreated), [`onLatestTokens`](/api-reference/subscriptions/onlatesttokens) |                                                                                                                     |
| `token-filters` (filtered screener list)          | [`onFilterTokensUpdated`](/api-reference/subscriptions/onfiltertokensupdated)                                                                                                                                                                                                                                                | Live re-ranked result set for a `filterTokens` query.                                                               |
| Raw indexing `swap` events                        | [`onTokenEventsCreated`](/api-reference/subscriptions/ontokeneventscreated), [`onEventsCreated`](/api-reference/subscriptions/oneventscreated)                                                                                                                                                                               | Token swap webhook                                                                                                  |
| Raw indexing `transfer` events                    | Not directly supported                                                                                                                                                                                                                                                                                                       | Codex streams swap and lifecycle events, not arbitrary token transfers. Pair with an RPC provider if you need this. |
| `funding`, `quoting`, raw indexing `perps-orders` | Not supported                                                                                                                                                                                                                                                                                                                | Perps and execution surfaces; Codex is a spot-trading data API.                                                     |

## 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`](/api-reference/queries/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`](/api-reference/queries/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`](/api-reference/queries/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`](/api-reference/queries/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`](/api-reference/subscriptions/onfiltertokensupdated) streams the same re-ranked list live.
* **Multi-timeframe stats in a single call.** [`getDetailedTokenStats`](/api-reference/queries/getdetailedtokenstats) and [`getDetailedPairStats`](/api-reference/queries/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`](/api-reference/queries/gettokenbars) and [`getBars`](/api-reference/queries/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`](/api-reference/queries/filterpredictionevents) and [`filterPredictionTraders`](/api-reference/queries/filterpredictiontraders) families. See [Prediction Markets](/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](/launchpads).
* **Wallet discovery by performance.** [`filterWallets`](/api-reference/queries/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`](/api-reference/queries/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`](/api-reference/mutations/createwebhooks).
* **Built for AI agents.** A [docs MCP server](/agents/docs-mcp), prebuilt [Codex Skills](/agents/codex-skills) for Claude/Cursor/Codex CLI, and pay-per-query access via [MPP](/agents/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.

<Tip>
  Pair this prompt with our [Codex Skills](/agents/codex-skills) and [docs MCP server](/agents/docs-mcp) so the agent can look up Codex queries on demand instead of guessing at field names.
</Tip>

```markdown theme={null}
You are migrating this codebase from Mobula (https://docs.mobula.io) to Codex (https://docs.codex.io). Mobula and Codex overlap heavily on token, market, trade, holder, and wallet data, so most call sites have a direct replacement. A few do not, and those need to be surfaced rather than silently dropped.

## Phase 1: Discovery (do this first, do not edit yet)

Search the codebase for every Mobula integration point. At minimum, look for:

- HTTP calls to `api.mobula.io` or `demo-api.mobula.io` (any path under `/api/1/...` or `/api/2/...`).
- WebSocket connections to `wss://api.mobula.io` (curated streams) or `wss://stream-*-prod.mobula.io` (raw indexing streams).
- Imports of the Mobula SDK (`@mobula_labs/sdk`) or any hand-rolled Mobula client.
- Environment variables and config keys named `MOBULA_*`.
- Header usage of `Authorization` pointing at Mobula, and websocket payloads that carry `authorization` inline.
- Code that switches behavior on Mobula `blockchain`/`blockchains` names or `chainId`/`chainIds` values (including CAIP-style IDs like `evm:1` and `solana:solana`).
- Tests, fixtures, and mocks that reference any of the above.

Produce a Migration Plan with:

1. A grouped list of every call site, organized by Mobula endpoint.
2. The proposed Codex equivalent for each group (use the mapping below).
3. Any call sites you cannot map cleanly, flagged for human review.
4. The order you intend to make changes (shared client/config first, then leaf call sites, then tests).
5. New dependencies, env vars, and config you will introduce.

Stop and surface the plan before editing any source files. Wait for confirmation.

## Phase 2: Execution (after the plan is approved)

Ground rules:

1. Codex is a GraphQL API at `https://graph.codex.io/graphql`. Auth header is `Authorization: <api-key>` for long-lived keys, or `Authorization: Bearer <jwt>` for short-lived keys. Mobula's `Authorization: <raw-key>` header maps almost directly; the request body changes to GraphQL.
2. Codex ships an official SDK for TypeScript/JavaScript only (`@codex-data/sdk`). Prefer it over hand-rolled HTTP in TS/JS projects. For Python and every other language there is no official SDK: use raw GraphQL over HTTP against `https://graph.codex.io/graphql`.
3. Network is a numeric `networkId` parameter, not a string name or a query param. Convert Mobula `blockchain`/`chainId` values to Codex network IDs. Mobula V1 uses names: `ethereum` → 1, `solana` → 1399811149, `base` → 8453, `bsc`/`binance-smart-chain` → 56, `polygon` → 137, `arbitrum` → 42161, `optimism` → 10, `avalanche` → 43114. Mobula V2 uses CAIP-style IDs: for `evm:<id>` the numeric part usually maps directly to the Codex `networkId` (`evm:1` → 1, `evm:8453` → 8453, `evm:56` → 56); `solana:solana` → 1399811149. For anything else, call `getNetworks` once and build a lookup rather than assuming.
4. Token IDs in Codex are the string `"<address>:<networkId>"`. Construct them explicitly; never assume an integration relies on bare addresses. Mobula's native-token placeholder `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` (EIP-7528; match it case-insensitively) maps to the network's native token in Codex; resolve it per network.
5. Collapse Mobula's version and single/batch/token/pair endpoint splits. `/api/1/...` + `/api/2/...` variants of the same concept, and `multi-*` batch endpoints, all become one Codex field with an array input and GraphQL aliases.
6. For real-time data, use WebSocket subscriptions when the consumer is a long-lived client (dashboards, trading UIs) and webhooks when the consumer is a server endpoint (alerts, background workers, queues). Mobula's curated streams map to Codex subscriptions; Mobula's raw indexing `swap` streams map to `onEventsCreated`/`onTokenEventsCreated`, but raw `transfer` streams have no Codex equivalent.
7. Preserve existing public function signatures, return shapes, and error semantics wherever possible. Internal helpers can be refactored freely.
8. Update tests as you change code. If a test relied on a Mobula response fixture, replace the fixture with a Codex equivalent rather than deleting the test.
9. When you hit a gap (perps, swap/bridge execution, prediction-market trading, raw transfers, NFT data, wallet labels/funding tracing, CeFi data), do not silently drop the feature. Leave the call site intact, add a `TODO(migration):` comment with a one-line note explaining what's missing and what provider could fill it, and list it in your final report.

## Mobula → Codex endpoint mapping

Prices and market data:
- `GET /1/market/data` → `getTokenPrices` + `getDetailedTokenStats` (add `token` for metadata)
- `GET /1/market/multi-data`, `GET|POST /1/market/multi-prices`, `GET|POST /2/token/price` → `getTokenPrices(inputs: [...])` (max 25 inputs per call; chunk larger batches or they are silently truncated)
- `GET|POST /2/token/price-at` → `getTokenPrices(inputs: [{ address, networkId, timestamp }])`
- `GET|POST /2/market/details` → `getDetailedTokenStats` (token) or `getDetailedPairStats` (pair/pool address)
- `GET|POST /2/token/details`, `GET|POST /2/asset/details` → `token` + `getDetailedTokenStats` in one query
- `GET /1/market/sparkline` → `tokenSparklines`
- `GET|POST /2/token/ath` → `filterTokens` (`athPrice`, `atlPrice`, `athFdv`, `atlFdv`, `athCircMc`, `atlCircMc` are filterable/returnable attributes)
- `GET /2/market/lighthouse` → compose from `filterTokens` signals (holder concentration, insider/sniper/bundler held %, `potentialScam`, liquidity, volume) + `getDetailedTokenStats` (no single quality score)

Metadata and search:
- `GET /1/metadata` → `token`
- `GET /1/multi-metadata` → `tokens(ids: [{ address, networkId }, ...])`
- `GET /1/all` → `filterTokens` (Codex does not dump the full asset universe)
- `GET /1/search`, `GET|POST /2/fast-search` → `filterTokens(phrase: "$SYMBOL", ...)`
- `GET /2/token/security` → safety fields on `token` (`isScam`, `mintable`, `freezable`, `creatorAddress`, `top10HoldersPercent`; `circulatingSupply`/`totalSupply` live under `token.info`) plus distribution signals on `filterTokens` (`potentialScam`, insider/sniper/bundler/dev held %). Dedicated contract scanning is in development; if deep honeypot/security checks are core, add a `TODO(migration):` and flag it rather than assuming full parity today.
- `GET /1/blockchains` → `getNetworks`

Pairs and markets:
- `GET /1/market/pair` → `getDetailedPairStats` (metadata via `pairMetadata`)
- `GET /1/market/pairs`, `GET /2/token/markets` → `listPairsForToken` / `listPairsWithMetadataForToken`
- `GET /1/market/blockchain/pairs` → `filterPairs`
- `GET /1/market/blockchain/stats` → `getNetworkStats`

Charts and OHLCV:
- `GET /1/market/history`, `GET /1/market/multi-history`, `GET|POST /2/token/price-history`, `GET|POST /2/token/ohlcv-history` → `getTokenBars`
- `GET /1/market/history/pair`, `GET|POST /2/market/ohlcv-history` → `getBars` (use `quoteToken` to invert the pair)

Trades:
- `GET|POST /2/token/trades`, `GET /2/token/trade`, `GET /1/market/trades/pair`, `GET /2/trades/filters` → `getTokenEvents(query: { address, networkId, ... })`
- `GET|POST /2/token/trades-enriched` → `getTokenEvents` + join `filterTokenWallets` for per-wallet PnL

Holders and traders:
- `GET|POST /2/token/holder-positions` → `holders` (ranked balances) + `filterTokenWallets` (per-token PnL)
- `GET|POST /2/token/trader-positions` → `tokenTopTraders(input: { tokenAddress, networkId, tradingPeriod })` (`tradingPeriod` is `DAY | WEEK | MONTH | YEAR`)
- `GET /1/token/first-buyers` → approximate from earliest `getTokenEvents` (no curated first-buyers surface)

Wallets:
- `GET /1/wallet/portfolio`, `GET|POST /2/wallet/holdings`, `GET /1/wallet/multi-portfolio` → `balances(input: { walletAddress, networks: [Int!], removeScams, tokens, limit })` (network is a plural array; native EVM balances require traces support)
- `GET /1/wallet/history`, `GET /2/wallet/positions-history` → `walletChart`
- `GET|POST /2/wallet/positions`, `GET /2/wallet/position`, `GET /2/wallet/analysis` → `detailedWalletStats` + `filterTokenWallets`
- `GET /1/wallet/trades`, `GET|POST /2/wallet/trades`, `GET|POST /2/wallet/activity`, `GET /1/wallet/transactions` → `getTokenEventsForMaker` (swap events; flag if raw transfers are required)

Discovery, search, and screening (all collapse into `filterTokens`, the single most flexible endpoint):
- `GET /1/market/query`, `GET /1/all` → `filterTokens` with filters + rankings (100+ attributes: price/marketCap/fdv, ATH/ATL, windowed volume/txnCount/change, liquidity, holders, age, launchpad state, scam/distribution signals)
- `GET /1/search`, `GET|POST /2/fast-search` → `filterTokens(phrase: "$SYMBOL", ...)` (search is an argument on the same endpoint)
- `GET|POST /2/pulse`, `GET /1/pulse` → `filterTokens` filtering on launchpad fields (`launchpadProtocol`, `launchpadGraduationPercent`, `launchpadCompleted`, `launchpadMigrated`); stream via `onFilterTokensUpdated` or `onLaunchpadTokenEvent`
- For any live filtered/ranked list (screener, trending board, new-listings feed), use `onFilterTokensUpdated` rather than polling `filterTokens`

Real-time (Mobula stream → Codex subscription):
- `market`, `market-pair` → `onPriceUpdated` / `onPricesUpdated`
- `market-details`, `token-details` → `onDetailedTokenStatsUpdated`
- `ohlcv` → `onBarsUpdated`
- `trade`, `fast-trade`, raw indexing `swap` → `onTokenEventsCreated` / `onEventsCreated`
- `position`, `positions` (by wallet) → `onEventsCreatedByMaker`
- `holders` → `onHoldersUpdated`
- `balance` → `onBalanceUpdated`
- `pulse-v2`, `token-filters`, any live filtered/screener list → `onFilterTokensUpdated` (plus `onLaunchpadTokenEvent`, `onTokenLifecycleEventsCreated`, `onLatestTokens` for launchpad lifecycle)
- raw indexing `transfer`, `perps-orders`, `funding`, `quoting` → not supported (Codex streams swaps and lifecycle events, not arbitrary transfers, perps, or execution)

Utility:
- `GET /1/blockchains` → `getNetworks`
- `GET /2/usage` → Codex usage in the dashboard

Gaps (flag, do not drop):
- `/2/perp/*`, `/2/wallet/positions/perp/*`, `/1/market/cefi/funding-rate`, perp streams: perpetuals data and execution not supported
- `/2/swap/*`, `/2/bridge/*`: Codex is read-only data; no quoting, routing, or execution
- `/2/pm/*` CLOB trading flow: Codex exposes prediction-market data (`filterPredictionEvents`), not order placement
- `/1/wallet/raw-transactions`, `/1/wallet/token-transfers`, `/1/wallet/nft-transfers`, raw `transfer` streams: pair with an RPC provider for raw transfers
- `/2/wallet/funding`, `/2/wallet/deployer`, `/2/wallet/labels`, `/labels/search`: no curated wallet-identity/entity labels (use `filterWallets` for behavior-based discovery)
- `/2/wallet/defi-positions`: no DeFi protocol positions (staking/lending/LP); pair with a DeFi-positions provider
- `/1/market/nft`, `/1/wallet/nfts`, `/1/metadata/nfts`: Codex does not expose NFT data
- `/1/market/total`, `/1/market/token-vs-market`, `/1/metadata/news`: no global-aggregate or editorial-news equivalent
- Native EVM balances via `balances` are only available on networks with traces enabled. If a customer relies on native-token portfolio values on a chain without traces, flag it.

When you need details on any Codex field, fetch the reference page at `https://docs.codex.io/api-reference/queries/<name>` (or `subscriptions`, `mutations`) rather than guessing. Before migrating any real-time code, fetch `https://docs.codex.io/concepts/subscriptions` and `https://docs.codex.io/concepts/webhooks` so you pick the right delivery mechanism.

## Phase 3: Final report

When the migration is done, produce a single report with:

1. Files changed, grouped by area (client/config, call sites, tests, docs).
2. Every `TODO(migration):` you added, with file path, line, and the reason.
3. New env vars and dependencies, with the line to add to `.env.example` and the package manager command to install.
4. Mobula integrations that were removed entirely, and what replaced them.
5. A short manual-verification checklist the human should run before merging (which features to click through, which endpoints to spot-check, which dashboards to load).

Run the project's linter and test suite before declaring the migration complete. If tests fail, fix the underlying integration, do not weaken the test.
```

## Getting help

* Browse the [API Reference](/api-reference/introduction) for the full schema.
* Skim the [Recipes](/recipes/discover-tokens) for end-to-end examples that solve specific product problems.
* Ask in [our community](https://discord.com/invite/mFpUhT3vAq) if you hit a wall during migration.
