Skip to main content

Codex

Codex is a blockchain data API that provides real-time and historical DeFi data across 80+ networks via GraphQL, including Celo. With access to over 70 million tokens and 700 million wallets, Codex delivers sub-second data for building token explorers, trading bots, portfolio trackers, and DeFi dashboards.

GraphQL API

Codex exposes a single GraphQL endpoint with 73 query operations for fetching current and historical data. All requests are sent as HTTPS POST to https://graph.codex.io/graphql. Key query capabilities include:

Real-Time Subscriptions

Codex supports 25 real-time data streams via WebSocket (wss://graph.codex.io/graphql), enabling live updates for:
  • Token price changes and trade events
  • New and updated DEX pairs
  • Wallet activity and balance changes
  • Launchpad and new token events

Webhooks

Webhooks provide push-based notifications for on-chain events, delivering data to your server as events occur without requiring persistent WebSocket connections.

SDK

Codex provides a TypeScript/JavaScript SDK that acts as a thin wrapper around the GraphQL API with predefined queries, mutations, and built-in subscription connection handling.
Alternatively, you can write custom GraphQL queries directly against the API for more flexibility.

Getting Started

1. Create an account

Sign up at dashboard.codex.io to create your Codex account.

2. Get your API key

Copy your API key from the API Keys page in the dashboard.

3. Make your first request

All requests require an Authorization header with your API key.

4. Explore the API

Use the GraphQL Explorer to interactively build and test queries.

Recipes & Guides

  • Token Discovery — Build token discovery pages with trending data, advanced filtering, and search
  • Price Charts — Render token charts with OHLCV data and real-time updates
  • Wallet Analytics — Analyze wallet performance and discover high-performing traders
  • Token Swap Events — Fetch and display token swaps with filtering, sorting, and real-time updates
  • Launchpad Monitoring — Build a launchpad dashboard with filtering, sorting, and real-time updates
  • Real-Time Price Tracking — Build a Node.js app that listens for token price changes in real time

Resources