Agents/Codex
Codex logo

Codex + GoldRush

by OpenAI
Terminal
Cloud
Codex is OpenAI's autonomous coding agent that executes tasks in a sandboxed cloud environment. It can independently write, test, and iterate on code. Combined with GoldRush, Codex can build blockchain data pipelines, create analytics dashboards, and automate onchain data workflows without manual intervention.

Quick Start

1
Install Codex CLI
npm install -g @openai/codex
2
Install GoldRush CLIQuery onchain data directly from your terminal, useful for testing queries before using them in your agent.
npm install -g @covalenthq/goldrush-cli
3
Configure GoldRush MCP Server
codex --mcp-config '{"goldrush":{"command":"npx","args":["-y","@covalenthq/goldrush-mcp-server"],"env":{"GOLDRUSH_API_KEY":"YOUR_API_KEY"}}}'
4
Start a Codex session
codex
5
Run your first onchain queryAsk: "Fetch the portfolio value for 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on Ethereum"

Example Prompts

Get the token balances for this wallet on Ethereum
Build a script that tracks new DEX pairs on Base
Create a Node.js API that returns wallet portfolio data
Analyze the top transactions for a given address this week
Write a cron job that monitors whale wallet movements
Build a React dashboard showing token prices across chains
Create a data pipeline that aggregates DEX volume by chain
Generate a CSV export of all token transfers for a wallet

Available MCP Tools (27)

Cross-Chain

multichain_balancesFetch spot and historical balances for an address on up to 10 EVM chains.
multichain_transactionsFetch paginated transactions for up to 10 addresses and 10 chains.
multichain_address_activityLocate chains an address is active on with a single API call.

Balances

token_balancesGet native and ERC20 token balances with spot prices and metadata.
historical_token_balancesGet token balances at a specific block height or date.
historical_portfolio_valueGet daily portfolio balance broken down by token.
erc20_token_transfersGet transfer-in and transfer-out events with historical prices.
token_holdersGet paginated current or historical holders of a token.
native_token_balanceGet native token balance with current market value.

Transactions

transactionFetch a single transaction with decoded log events.
transaction_summaryGet earliest/latest transactions and count for a wallet.
transactions_for_addressGet paginated transactions with decoded logs for an address.
transactions_for_blockGet all transactions in a block with decoded events.

Bitcoin

bitcoin_hd_wallet_balancesGet balances for child addresses from an HD wallet xpub key.
bitcoin_transactionsGet full transaction history for a Bitcoin wallet.
bitcoin_non_hd_wallet_balancesGet balance for a non-HD Bitcoin address.

NFTs

nft_for_addressGet ERC721 and ERC1155 NFTs held by an address.
nft_check_ownershipVerify NFT ownership within a collection.
nft_check_ownership_token_idVerify ownership of a specific NFT by token ID.

Pricing

historical_token_pricesGet historical prices for ERC20 and native tokens.
pool_spot_pricesGet spot prices for a Uniswap V2/V3 pool.

Security

token_approvalsGet token approvals categorized by spender with risk levels.

Utility

gas_pricesGet real-time gas estimates for low, medium, and high speeds.
blockFetch a single block with timestamp, tx count, and miner info.
block_heightsGet block heights within a date range.
log_events_by_addressGet event logs emitted from a contract address.
log_events_by_topicGet event logs by topic hash across all contracts.

GoldRush Agent Skills

GoldRush Agent Skills give AI agents structured context for every endpoint, parameter, and credit cost. View all skills on GitHub →
Install GoldRush Skills
npx skills add covalenthq/goldrush-agent-skills
Available skills
Foundational APIREST endpoints for historical blockchain data. Balances, transactions, NFTs, token prices, security checks, cross-chain queries across 100+ networks.
Streaming APIReal-time GraphQL subscriptions. OHLCV candles, new DEX pairs, wallet activity monitoring, token search, and PnL queries via WebSocket.
x402Pay-per-request access without API keys. Agents pay with stablecoins using the HTTP 402 protocol. No accounts, no rate limits, no key management.
CLITerminal-first blockchain data with native MCP support. 17 commands that work for both humans and AI agents.

Common Workflows

Build a Data Pipeline

1Describe the data pipeline requirements to Codex
2Codex scaffolds the project with GoldRush SDK integration
3It writes data fetching, transformation, and storage logic
4Codex runs tests in its sandbox and iterates on failures

Create an Analytics API

1Ask Codex to create an Express API with GoldRush endpoints
2It builds routes for balances, transactions, and pricing
3Codex adds error handling and rate limiting
4It creates a Dockerfile for deployment

Automate Wallet Monitoring

1Request a wallet monitoring service
2Codex builds a polling system using GoldRush transaction APIs
3It adds notification logic for large transfers

Generate Onchain Reports

1Ask Codex to build a report generator
2It fetches portfolio, transaction, and NFT data via GoldRush
3Codex formats the data into markdown or PDF reports
4It sets up scheduled report generation

Tips for Success

Codex works best with clear, specific task descriptions
Use the cloud sandbox for tasks that require running and testing code
Set your GOLDRUSH_API_KEY in the environment before starting Codex
Review Codex-generated PRs carefully before merging

Codex FAQ

Codex executes code in a sandboxed cloud environment. It can install packages, run tests, and build projects safely without affecting your local machine.

Troubleshooting

MCP Server not connecting in sandboxEnsure the MCP configuration is passed correctly via the --mcp-config flag. The sandbox needs network access to reach the GoldRush API.
API key not available in sandboxPass the API key through the MCP config env field rather than relying on local environment variables, as the sandbox has its own environment.
Timeout on large data queriesFor queries returning large datasets, instruct Codex to add pagination. Use the page_size parameter in GoldRush API calls to limit response size.

Get Started

Get started with GoldRush API in minutes. Sign up for a free API key and start building.

Support

Explore multiple support options! From FAQs for self-help to real-time interactions on Discord.

Contact Sales

Interested in our professional or enterprise plans? Contact our sales team to learn more.