# Codex — Pipedream Connect

> Real-time, enriched blockchain data for 70 million+ tokens on 80+ networks

- API slug: `codex` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Developer Tools
- Website: https://www.codex.io
- This page (HTML): https://pipedream.com/apps/codex
- Tools: 10 actions · 0 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: codex`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "codex",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Filter Tokens:
const result = await mcp.callTool({
  name: "codex-filter-tokens",
  arguments: {
    phrase: "Search Phrase",
    networkId: 10,
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Codex endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.example.com/v1/me

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEvbWU?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "codex-filter-tokens",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    codex: { authProvisionId: "apn_xxxxxxx" },
    phrase: "Search Phrase",
    networkId: 10,
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (10)

### `codex-filter-tokens` — Filter Tokens (Read-only)

Discovers and ranks tokens by on-chain signals such as volume, trending score, liquidity, or market cap. Use this to find trending tokens, top movers, or tokens matching a search phrase. To look up a specific token by its known contract address, use Get Token Details instead. Filter to a specific…

Full schema: https://pipedream.com/apps/codex/actions/filter-tokens.md

### `codex-get-networks` — Get Networks (Read-only)

Returns all 80+ blockchain networks supported by Codex with their numeric IDs and names. Call this first to resolve networkId values required by every other Codex tool. Example: Ethereum = 1, Polygon = 137, BNB Chain = 56, Arbitrum = 42161. See the documentation

Full schema: https://pipedream.com/apps/codex/actions/get-networks.md

### `codex-get-pair-stats` — Get Pair Stats (Read-only)

Returns metadata and trading statistics for a token pair: price, volume, liquidity, and price changes across multiple timeframes. Use this to analyze DEX pair activity (e.g., Uniswap V2/V3 pools). statsType FILTERED removes wash trades for cleaner signal; UNFILTERED includes all activity. Use Get…

Full schema: https://pipedream.com/apps/codex/actions/get-pair-stats.md

### `codex-get-prediction-market-data` — Get Prediction Market Data (Read-only)

Returns prediction market outcomes (Polymarket, Kalshi) with current prices and implied probabilities. Filter by keyword phrase, market IDs, event IDs, protocol, status, liquidity, volume, and more. Requires a Codex Growth or Enterprise plan — returns an error on free/Starter plans. Supports…

Full schema: https://pipedream.com/apps/codex/actions/get-prediction-market-data.md

### `codex-get-token-chart` — Get Token Chart (Read-only)

Returns OHLCV (open, high, low, close, volume) candlestick bars for a token over a time range. Use this for price charts, trend analysis, or historical data. Use Get Networks to resolve networkId if needed. from and to are Unix timestamps in seconds (e.g., current time = Math.floor(Date.now() /…

Full schema: https://pipedream.com/apps/codex/actions/get-token-chart.md

### `codex-get-token-details` — Get Token Details (Read-only)

Fetches current price, market cap, volume, liquidity, and metadata for one or more specific tokens by contract address. Use this when you already know the token address(es) and want to look up their current data. To discover tokens by name or ranking instead, use Filter Tokens. Use Get Networks…

Full schema: https://pipedream.com/apps/codex/actions/get-token-details.md

### `codex-get-token-events` — Get Token Events (Read-only)

Returns on-chain trading events (swaps, mints, burns) for a token or pair address. Each event includes event type, USD price, timestamp, transaction hash, and maker address. Filter by event type, wallet address, price range, timestamp window, and more. Use Get Networks to resolve the numeric…

Full schema: https://pipedream.com/apps/codex/actions/get-token-events.md

### `codex-get-token-holders` — Get Token Holders (Read-only)

Returns the list of token holders with their balances and the top-10 holder concentration percentage. Use this to analyze token distribution and whale concentration. Use Get Networks to resolve the numeric networkId if needed. Supports cursor-based pagination — pass cursor from the previous…

Full schema: https://pipedream.com/apps/codex/actions/get-token-holders.md

### `codex-get-wallet-balances` — Get Wallet Balances (Read-only)

Returns all token holdings and USD values for a wallet address on a specific blockchain network. Use this to inspect what tokens a wallet holds. Use Get Networks to resolve the numeric networkId if needed (e.g., 1 = Ethereum, 137 = Polygon). See the documentation

Full schema: https://pipedream.com/apps/codex/actions/get-wallet-balances.md

### `codex-get-wallet-transactions` — Get Wallet Transactions (Read-only)

Returns token holdings and aggregated trading stats for one or more wallet addresses. Each result includes token balance, realized P&L, buy/sell counts, and average hold period across 1d, 1w, 30d, and 1y windows. Filter by wallet address, token, network, labels, or numeric range filters. Use Get…

Full schema: https://pipedream.com/apps/codex/actions/get-wallet-transactions.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
