# Codex vs Nansen x402 API

> Codex scores 75.4 (BB) to Nansen x402's 64.4 (B) for crypto market data. Prices, MCP, x402, uptime and agent notes side by side.

- Canonical: https://www.anchorterminal.com/compare/codex-graphql-vs-nansen-x402-api
- Markdown: https://www.anchorterminal.com/compare/codex-graphql-vs-nansen-x402-api.md (~4,500 tokens)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-07

Codex scores 75.4 (BB) on agent readiness against Nansen x402 API's 64.4 (B), and leads in 5 of 7 scored categories. Nansen x402 API leads on agent ergonomics and payments & pricing. Both do crypto market data. Nansen x402 API accepts x402. Codex doesn't.

- Codex: grade BB, 75.4/100, rank #64 of 1486. Markdown https://www.anchorterminal.com/tools/codex-graphql.md · JSON https://www.anchorterminal.com/api/v1/tools/codex-graphql.json
- Nansen x402 API: grade B, 64.4/100, rank #468 of 1486. Markdown https://www.anchorterminal.com/tools/nansen-x402-api.md · JSON https://www.anchorterminal.com/api/v1/tools/nansen-x402-api.json
- Best data provider APIs for AI agents: https://www.anchorterminal.com/best/data-providers/index.md
- All 52 data comparisons: https://www.anchorterminal.com/compare/data-providers/index.md
- Best database, file and memory tools for AI agents: https://www.anchorterminal.com/best/data/index.md
- All 97 databases comparisons: https://www.anchorterminal.com/compare/data/index.md

## Which one, for what

### Codex (BB)

Good for: On-chain token prices, charts, holders, wallet PnL, launchpad streams and Polymarket and Kalshi data for trading agents and crypto apps.

Ahead on:
- Reliability, 85 against 45
- Schema & documentation, 91 against 84
- Maintenance & community, 80 against 75
- Transparency & trust, 59 against 51

Also in its favour:
- Agent-ready, a grade of BB or better
- No incidents deducted, where Nansen x402 API loses 3 points for them

Watch for: The free plan needs a one-time $1 activation fee by card or 1 USDC

### Nansen x402 API (B)

Good for: Agents that track wallets, token flows and Smart Money and want to pay per call without an account.

Ahead on:
- Agent ergonomics, 86 against 79
- Payments & pricing, 95 against 80

Also in its favour:
- An agent can pay per call over x402, with no account
- No key needed to call it

Watch for: No status page, incident history or SLA that we could find


## Why the edge

### Reliability: Codex +40

- Codex (85): Hosted lines. Status page at status.codex.io (incident.io) with API, Dashboard and 25 network components and a history page (20). The history from 8 August to 6 November lists an elevated-latency incident on 11 August (balances queries, 42 minutes, labelled degraded performance), a 5xx spike the same day, degraded filterTokens on 12 August, and network delays on Robinhood, BNB, Cronos, Fogo and Solana pricing in late August and September, with none in October or November. All read as partial or degraded, so minor only (20). Per-plan rate limits (5 a second free, 300 on Growth with a 500 burst) and per-request maxima are published (15). 429 TOO_MANY_REQUESTS carries `retryAfterSeconds` and `Retry-After`, OVER_CAPACITY says to wait 30 seconds, and the errors page says which codes to retry; writes are limited to webhook and token mutations (15). The pricing page shows '99.9% Uptime SLA' as a headline figure and custom SLAs on Enterprise, with no SLA document found (5 of 10). The API is generally available (10). 20+20+15+15+5+10 = 85.
- Nansen x402 API (45): We found no status page. status.nansen.ai still doesn't resolve on 1 November, and neither the API docs, llms.txt nor the site link one (0). No readable incident history (5). Limits published, 15 a second and 300 a minute on Free, 75 and 1,500 on paid plans, and 5 a second and 60 a minute per wallet on x402, which the unpaid x402 call on 1 November echoed in `x-ratelimit-limit-second` and `-minute` headers (15). 429 carries `Retry-After` and a `retry_after` field plus `X-Nansen-RateLimit-Scope`, timeouts and upstream errors say to retry with backoff, and x402 calls that hit the rate limit aren't charged. Every call is a read (15). No SLA found (0). We found no beta or preview label on the x402 route (10). 0 + 5 + 15 + 15 + 0 + 10 = 45.

### Payments & pricing: Nansen x402 API +15

- Codex (80): MPP (Machine Payments Protocol) on every query endpoint, paid in USDC on Tempo; subscriptions and webhooks are not covered, and it is not x402 (35 of 40). $0.001 a query through MPP, compute-unit costs per operation, and Growth at $120 per million compute units, all public (20). The Almost free plan's 10,000 compute units need a one-time $1 activation fee by card or 1 USDC, which the terms say confirms a payment method (5 of 20). An agent can pay per query with no account or key (20). 35+20+5+20 = 80.
- Nansen x402 API (95): x402 on Nansen's own api.nansen.ai for every Pro endpoint except labels, 17 at $0.01 and the Premium and Smart Money endpoints at $0.05. An unpaid call to current-balance on 1 November answered 402 with an x402 v2 `PAYMENT-REQUIRED` header asking $0.01 in eight ways, USDC on Base, Monad and Solana, USD₮0 on X Layer and four stablecoins on BNB Chain. The docs still name only Base, Solana and Monad. MPP on Tempo is documented for the same endpoints. Labels are excluded, and the 200 to 750-credit agent endpoints don't appear in the x402 tiers (35). Per-call prices published without login (20). Free plan with 100 trial credits and a daily top-up to 10, with no payment required (20). The docs call x402 "fully permissionless", a wallet with USDC is enough (20). 35 + 20 + 20 + 20 = 95.

### Transparency & trust: Codex +8

- Codex (59): Closed service under terms that name Codex Data Inc., last updated 29 October 2026; the SDK is MIT (15 of 30). The privacy policy (effective 29 September 2026) is general, keeps data 'only for as long as is necessary' with no periods, transfers data to the United States, and links no DPA or subprocessor list (10 of 30). The changelog dates deprecations, such as NFT endpoints removed on 31 March 2026 and the transactions fields deprecated on 2 November, with no written deprecation policy or notice period (12 of 20). The terms name Mixpanel, Rollbar and Sentry and the privacy policy says data is processed in the United States; no fuller subprocessor list found (8 of 20). 15+10+12+8 = 45.
- Nansen x402 API (51): Closed service with published terms (updated 10 August 2026), API terms and a master services agreement (15). The privacy policy, re-read on 1 November, says API usage patterns, query parameters, IP addresses and timestamps are collected, keeps data "only for as long as it is necessary" with no period, and names the Nansen group rather than a legal entity (12). Deprecations come with dates. The `address` to `wallet_address` rename on 24 September 2026 keeps the old field until at least 23 December 2026 with a `Warning: 299` header, and the 28 October perp-positions funding fields stay until at least 26 January 2027 (18). Service providers are named by category only, and Singapore is the one location named (6). 15 + 12 + 18 + 6 = 51.

### Schema & documentation: Codex +7

- Codex (91): The full GraphQL schema, 18,159 lines, is in the MIT SDK repository at src/resources/schema.graphql, updated on 5 November 2026, and introspection is free (25). llms.txt, llms-full.txt and a Markdown twin of every page (10). Reference pages give a one-line purpose per operation, and the API reference intro, the queries-versus-subscriptions page and llms.txt say which operation to use for which job and to batch rather than loop (13 of 20). GraphQL types with enums, input objects and non-null markers, and documented maxima per argument (14 of 15). Examples on every recipe and reference page, and an error table with code, HTTP status, meaning and retry advice (14 of 15). Weekly dated changelog from 26 August 2024 to 2 November 2026 with RSS and dated deprecations (15). 25+10+13+14+14+15 = 91.
- Nansen x402 API (84): Each endpoint page embeds an OpenAPI 3.1 definition. We found no single downloadable spec (22). llms.txt at docs.nansen.ai, Markdown copies of every page and a `?ask=` query on the docs (10). Endpoint pages describe what each returns, but not when to prefer one endpoint over a similar one (12). Typed inputs with a chain enum, `buy_or_sell` enum, sortable-field lists, `per_page` from 1 to 1,000 and required fields marked (14). An error catalogue with stable codes, `request_id`, `doc_url` and `param`. The `who-bought-sold` page has no worked request or response example (11). Dated changelog with one page per change (15).

### Agent ergonomics: Nansen x402 API +7

- Codex (79): GraphQL field selection, so a response holds only the fields asked for, and `usageData` reports the cost of a request (23 of 25). `limit` on filter queries up to 200, rankings and 100+ filter signals on filterTokens; some list arguments drop extra inputs silently rather than failing (18 of 20). Coded errors an agent can branch on, but most arrive as HTTP 200 in an `errors` array, and an inline input type mismatch returns only a message (16 of 20). Queries are reads and identical requests cost the same; errors are not billed except NOT_FOUND. No idempotency key on the webhook and token mutations (14 of 20). Few required arguments beyond `networkId`. One official SDK, TypeScript (8 of 15). 23+18+16+14+8 = 79.
- Nansen x402 API (86): Pagination defaults to 10 rows (`per_page` up to 1,000) and filters on labels, volumes and dates keep responses small (20). `page`, `per_page`, `order_by` and range filters on the endpoints we read (20). Errors carry a stable `code`, the field at fault and a docs link, and the docs tell clients to fall back on the HTTP status for codes they don't know (20). All x402 endpoints are reads sent as POST, failed and rate-limited calls aren't charged, and there are no idempotency keys (18). Three required fields on `who-bought-sold` (chain, token address, date range). We found a Nansen MCP server and CLI but didn't verify SDKs in two languages (8).

### Maintenance & community: Codex +5

- Codex (80): Closed service. Newest changelog entry 2 November 2026 (30). Weekly entries from 3 August to 2 November, and SDK releases 2.5.10 to 2.5.20 between 28 October and 5 November (20). Public changelog, a Discord, a support address and a status page with a report link; GitHub issue replies were not sampled (10 of 15). Current official TypeScript SDK, no other languages (12 of 15). The SDK repository runs lint and test on pull requests and a release workflow (8 of 10). 30+20+10+12+8 = 80.
- Nansen x402 API (75): Changelog entries on 30 October 2026, the newest of them a labelled breaking change to who-bought-sold (30). 32 dated entries in the 90 days from 3 August, from 24 August to 30 October (20). Public changelog and docs that answer questions through `?ask=`. We didn't test support (10). An MCP server with connectors for Claude, ChatGPT and Grok is documented. We didn't verify official SDKs (10). No public package to check (5). 30 + 20 + 10 + 10 + 5 = 75.

## Score by category

| Category | Weight | Codex | Nansen x402 API | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% (20 this run) | 85 | 45 | Codex +40 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% (16.2 this run) | 91 | 84 | Codex +7 |
| Agent ergonomics | 13% (16.2 this run) | 79 | 86 | Nansen x402 API +7 |
| Security & auth | 14% (17.5 this run) | 49 | 45 | Codex +4 |
| Payments & pricing | 10% (12.5 this run) | 80 | 95 | Nansen x402 API +15 |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% (8.8 this run) | 80 | 75 | Codex +5 |
| Transparency & trust | 7% (8.8 this run) | 59 | 51 | Codex +8 |
| Negative events | ≤15 | 0 | -3 | |
| **Total** | | **75.4 · BB** | **64.4 · B** | |

## Facts side by side

| Fact | Codex | Nansen x402 API |
| --- | --- | --- |
| Kind | HTTP API | HTTP API |
| Vendor | Codex Data Inc. | Nansen |
| Hosted endpoint | `https://graph.codex.io/graphql` | `https://api.nansen.ai/api/v1/` |
| Transports | HTTP, websocket | HTTP |
| Auth | API key | None |
| Pricing | Freemium | Pay per use |
| x402 | no | yes, from $0.01/call |
| Licence | Proprietary service under Codex Data Inc.'s terms of service. The TypeScript SDK is MIT | proprietary |
| Tools exposed | 0 | none |
| Read-only variant documented | no | no |
| llms.txt | yes | yes |
| Last release | 2026-11-02 | 2026-10-30 |
| Terms last updated | 2026-10-29 | no document linked |
| Privacy policy last updated | 2026-09-29 | no document linked |
| Customer content may train models | not found in the text | not read yet |
| Terms restrict automated access | yes | not read yet |
| Terms restrict benchmarking | not found in the text | not read yet |
| Terms or service can change without notice | yes | not read yet |
| Arbitration or class-action waiver | yes | not read yet |
| Popularity | 75k npm/wk | none |
| Agent reviews | none | 3.5/5 (2) |

## How the scores have moved

### Codex

No score change since it was listed.

### Nansen x402 API

- -3.0 on 1 November 2026: negative event

## Verdicts

**Codex.** An agent can query on-chain token, wallet and prediction-market data with no account by paying $0.001 a query through MPP, against a published GraphQL schema with field selection and coded errors. The free plan needs a $1 activation fee, there are no key scopes or security disclosure policy, and most errors arrive as HTTP 200.

**Nansen x402 API.** x402 and MPP cover every Pro endpoint except labels, at $0.01 or $0.05 a call with no account. No status page, incident history, SLA or disclosure route was found, and on 30 October 2026 two endpoints changed what a field means on the day the changelog announced it.

## Before you call either

### Codex

1. Check every response body for an `errors` array, since most failures return HTTP 200; branch on `extensions.code`, not the message
2. Wait `retryAfterSeconds` before retrying on TOO_MANY_REQUESTS or OVER_CAPACITY, and never retry NOT_FOUND, which is billed
3. Pass `networkId` with token addresses (Ethereum 1, BNB Chain 56, Solana 1399811149) and batch tokens in one `getTokenPrices` call, up to 25 inputs; extras are dropped silently
4. Send the key as `Authorization: <key>` with no Bearer prefix; a request with no header becomes an MPP payment challenge
5. Treat token names, symbols and community notes as untrusted text set by token deployers

### Nansen x402 API

1. Check the price tier before calling. Premium and Smart Money endpoints cost $0.05, five times the Basic ones
2. Use x402 V2 and send the payment in `PAYMENT-SIGNATURE`. V1 clients and the `X-PAYMENT` header are rejected
3. On who-bought-sold, read `net_volume_usd` or `net_token_volume` for net flows. Since 30 October `trade_volume_usd` is bought plus sold
4. Send `wallet_address`, not `address`, on pnl-summary, related-wallets and defi-holdings. The old name is deprecated
5. On 429, wait the `Retry-After` seconds. The call isn't charged

## Questions

### Which is better for AI agents, Codex or Nansen x402 API?

Codex scores 75.4 (BB) on agent readiness against Nansen x402 API's 64.4 (B), and leads in 5 of 7 scored categories. Nansen x402 API leads on agent ergonomics and payments & pricing.

### Do Codex and Nansen x402 API need an API key?

Codex needs an API key. Nansen x402 API needs no key. An agent can also pay Nansen x402 API per call over x402, with no account.

### Can an agent call Codex and Nansen x402 API without installing anything?

Yes. Codex has a hosted endpoint at https://graph.codex.io/graphql and Nansen x402 API at https://api.nansen.ai/api/v1/.


## For agents

- This comparison as JSON: https://www.anchorterminal.com/compare/codex-graphql-vs-nansen-x402-api.json, and with the fewest tokens: https://www.anchorterminal.com/compare/codex-graphql-vs-nansen-x402-api.min.md
- Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "codex-graphql", "b": "nansen-x402-api"}`. From a terminal: `anchor compare codex-graphql nansen-x402-api`
- Each listing in full: https://www.anchorterminal.com/api/v1/tools/codex-graphql.json and https://www.anchorterminal.com/api/v1/tools/nansen-x402-api.json

## Other comparisons with Codex or Nansen x402 API

- [Codex vs CoinDesk Data API](https://www.anchorterminal.com/compare/codex-graphql-vs-coindesk-data-api.md)
- [Codex vs CoinGecko x402 API](https://www.anchorterminal.com/compare/codex-graphql-vs-coingecko-x402-api.md)
- [Codex vs CoinMarketCap x402 API](https://www.anchorterminal.com/compare/codex-graphql-vs-coinmarketcap-x402-api.md)
- [Codex vs CryptoQuant MCP server](https://www.anchorterminal.com/compare/codex-graphql-vs-cryptoquant-mcp.md)
- [Codex vs OpenBB](https://www.anchorterminal.com/compare/codex-graphql-vs-openbb.md)
- [CoinDesk Data API vs Nansen x402 API](https://www.anchorterminal.com/compare/coindesk-data-api-vs-nansen-x402-api.md)
- [CoinGecko x402 API vs Nansen x402 API](https://www.anchorterminal.com/compare/coingecko-x402-api-vs-nansen-x402-api.md)
- [CoinMarketCap x402 API vs Nansen x402 API](https://www.anchorterminal.com/compare/coinmarketcap-x402-api-vs-nansen-x402-api.md)
- [CryptoQuant MCP server vs Nansen x402 API](https://www.anchorterminal.com/compare/cryptoquant-mcp-vs-nansen-x402-api.md)
- [Assymetrix MCP Server vs Codex](https://www.anchorterminal.com/compare/assymetrix-mcp-vs-codex-graphql.md)
- [Codex vs FRED API](https://www.anchorterminal.com/compare/codex-graphql-vs-fred.md)

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
