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

  1. Install the CLI and sign in (details):
    curl -fsSL https://swiftnodes.io/install.sh | sh
    swiftnodes login
  2. 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

  1. 01 Large USDC transfer tape · Base · Live feed
  2. 02 Multi-chain wallet balance snapshot · Ethereum, Base, Arbitrum, Optimism, Polygon · Report
  3. 03 Uniswap v3 swap tape · Base · Live feed
  4. 04 Gas and fee board across chains · Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain · Dashboard
  5. 05 Daily balance history from archive state · Ethereum · Report
  6. 06 New contract deployments feed · Base · Live feed
  7. 07 Bitcoin address watcher · Bitcoin · Monitor
  8. 08 Robinhood Chain activity monitor · Robinhood Chain · Dashboard
Recipe 01 · Live feed

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
Recipe 02 · Report

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
Recipe 03 · Live feed

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
Recipe 04 · Dashboard

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
Recipe 05 · Report

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)
Recipe 06 · Live feed

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
Recipe 07 · Monitor

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
Recipe 08 · Dashboard

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.