Agent cookbook
Copy-ready prompts for Claude Code, Codex, Cursor or any agent that can run shell commands. Each prompt names the endpoints and methods to use, the decoding rules agents often get wrong (signed integers, token decimals, reorgs, reconnects), and the checks to run on real data before calling the job done.
We ran every prompt in a fresh agent session against live SwiftNodes endpoints and folded what broke back into the text. Fill in the <PLACEHOLDERS>, paste, and let the agent work.
Before you start
- Install the CLI and sign in (details):
curl -fsSL https://swiftnodes.io/install.sh | sh swiftnodes login
- Optional: connect the hosted MCP server so the agent can look up chains and method support (details):
claude mcp add --transport http --scope user swiftnodes https://rpc.swiftnodes.io/mcp \ --header "Authorization: Bearer $SWIFTNODES_API_KEY"
The prompts run swiftnodes project setup, which writes SWIFTNODES_API_KEY, SWIFTNODES_RPC_URL and SWIFTNODES_WSS_URL into .env, so the key stays out of the chat and out of git. Use --key-name to reuse one of your keys or --create-key to make a new one. Node.js 22 or later has a built-in WebSocket client, so the recipes need no npm packages.
Recipes
- 01 Large USDC transfer tape · Base · Live feed
- 02 Multi-chain wallet balance snapshot · Ethereum, Base, Arbitrum, Optimism, Polygon · Report
- 03 Uniswap v3 swap tape · Base · Live feed
- 04 Gas and fee board across chains · Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain · Dashboard
- 05 Daily balance history from archive state · Ethereum · Report
- 06 New contract deployments feed · Base · Live feed
- 07 Bitcoin address watcher · Bitcoin · Monitor
- 08 Robinhood Chain activity monitor · Robinhood Chain · Dashboard
Large USDC transfer tape
One line per USDC transfer above a threshold on Base, from a WebSocket log subscription, with a polling backfill so nothing is missed across reconnects.
- Chains
- Base
- Methods
- eth_subscribe logs, eth_getLogs
- Plan
- Free works; a paid plan for long backfills
Multi-chain wallet balance snapshot
Native and USDC balances for a list of addresses on five chains, one Multicall3 call per chain, written to CSV.
- Chains
- Ethereum, Base, Arbitrum, Optimism, Polygon
- Methods
- eth_call (Multicall3 aggregate3)
- Plan
- Free
Uniswap v3 swap tape
Decoded swaps from the WETH/USDC 0.05% pool on Base, with side, size, price and USD notional, from the pool's own events.
- Chains
- Base
- Methods
- eth_subscribe logs, eth_call, eth_getLogs
- Plan
- Free
Gas and fee board across chains
A terminal table of base fee, priority fee percentiles and block fullness on six chains, refreshed every 15 seconds.
- Chains
- Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain
- Methods
- eth_feeHistory, eth_blockNumber
- Plan
- Free
Daily balance history from archive state
An address's ETH balance at midnight UTC for each of the last 30 days, using archive routing and a block-by-timestamp search.
- Chains
- Ethereum
- Methods
- eth_getBalance at old blocks (&archive=1), eth_getBlockByNumber
- Plan
- Paid plan (archive)
New contract deployments feed
Every contract created on Base as blocks arrive, with deployer, code size, and ERC-20 name and symbol when the contract is a token.
- Chains
- Base
- Methods
- eth_subscribe newHeads, eth_getBlockReceipts, eth_getCode, eth_call
- Plan
- Free
Bitcoin address watcher
Watch Bitcoin addresses for new transactions and balance changes with the Blockbook address API, with confirmations counted until final.
- Chains
- Bitcoin
- Methods
- Blockbook /api/v2/address, /api/v2/tx
- Plan
- Free
Robinhood Chain activity monitor
Transactions per second, gas used, and the most-called contracts on Robinhood Chain (about 10 blocks a second) over a rolling window.
- Chains
- Robinhood Chain
- Methods
- eth_subscribe newHeads, eth_getBlockByNumber (full transactions)
- Plan
- Free
Need a chain or method that isn't here? Check the method support matrix, or ask your agent to call get_method_support through the MCP server. Every chain's endpoints are also in endpoints.json.