Interact with Alchemy's Web3 APIs for blockchain data, NFTs, tokens, transfers, and webhooks across 80+ chains.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install alchemy-web3或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install alchemy-web3⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/alchemy-web3/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: alchemy-web3 version: 1.0.2 description: Interact with Alchemy's Web3 APIs for blockchain data, NFTs, tokens, transfers, and webhooks across 80+ chains. author: GizmoLab website: https://gizmolab.io?utm_source=alchemy-web3-skill&utm_medium=github&utm_campaign=skill homepage: https://github.com/0xGizmolab/alchemy-web3-skill repository: https://github.com/0xGizmolab/alchemy-web3-skill metadata: { "openclaw": { "requires": { "env": ["ALCHEMY_API_KEY"] } } } ---
Query blockchain data, NFTs, tokens, and transfers using Alchemy's production-grade APIs. Supports Ethereum, Polygon, Arbitrum, Base, Solana, and 80+ other chains.
Built by GizmoLab — Web3 development agency specializing in dApps, smart contracts, and blockchain infrastructure.
> 💡 New to Web3 development? GizmoLab offers full-stack blockchain development services.
# Add to ~/.openclaw/.env
ALCHEMY_API_KEY=your_api_key_here
# Optional: Set default chain (defaults to eth-mainnet)
ALCHEMY_CHAIN=eth-mainnet
| Chain | Endpoint Prefix | |-------|-----------------| | Ethereum | eth-mainnet, eth-sepolia | | Polygon | polygon-mainnet, polygon-amoy | | Arbitrum | arb-mainnet, arb-sepolia | | Optimism | opt-mainnet, opt-sepolia | | Base | base-mainnet, base-sepolia | | Solana | solana-mainnet, solana-devnet | | zkSync | zksync-mainnet | | Linea | linea-mainnet | | Scroll | scroll-mainnet | | Blast | blast-mainnet |
Full list: alchemy.com/docs/chains
# Set your API key first
export ALCHEMY_API_KEY="your_key"
# Use the CLI
~/.openclaw/workspace/skills/alchemy-web3/scripts/alchemy.sh <command> [options]
./alchemy.sh balance 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
# Returns: 1234.56 ETH
./alchemy.sh tokens 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
# Returns: All ERC-20 tokens held by address
./alchemy.sh nfts 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
# Returns: All NFTs owned by address
./alchemy.sh nft-metadata 0x5180db8F5c931aaE63c74266b211F580155ecac8 1590
# Returns: Metadata for specific NFT
./alchemy.sh transfers 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
# Returns: Transaction history (in/out)
./alchemy.sh block latest
./alchemy.sh block 12345678
./alchemy.sh tx 0x123...abc
./alchemy.sh ens vitalik.eth
# Returns: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
./alchemy.sh --chain polygon-mainnet balance 0x...
./alchemy.sh --chain arb-mainnet nfts 0x...
# Get ETH balance
curl -X POST "https://eth-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "latest"],
"id": 1
}'
# Get NFTs for owner
curl "https://eth-mainnet.g.alchemy.com/nft/v3/$ALCHEMY_API_KEY/getNFTsForOwner?owner=vitalik.eth&pageSize=10"
# Get NFT metadata
curl "https://eth-mainnet.g.alchemy.com/nft/v3/$ALCHEMY_API_KEY/getNFTMetadata?contractAddress=0x5180db8F5c931aaE63c74266b211F580155ecac8&tokenId=1590"
# Get NFTs for collection
curl "https://eth-mainnet.g.alchemy.com/nft/v3/$ALCHEMY_API_KEY/getNFTsForContract?contractAddress=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&limit=10"
# Get token balances
curl -X POST "https://eth-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "alchemy_getTokenBalances",
"params": ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"],
"id": 1
}'
# Get token metadata
curl -X POST "https://eth-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "alchemy_getTokenMetadata",
"params": ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"],
"id": 1
}'
# Get asset transfers (transaction history)
curl -X POST "https://eth-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "alchemy_getAssetTransfers",
"params": [{
"fromBlock": "0x0",
"toBlock": "latest",
"toAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"category": ["external", "erc20", "erc721", "erc1155"],
"maxCount": "0x14"
}],
"id": 1
}'
const apiKey = process.env.ALCHEMY_API_KEY;
const baseURL = `https://eth-mainnet.g.alchemy.com/v2/${apiKey}`;
// Get ETH Balance
async function getBalance(address) {
const response = await fetch(baseURL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
method: 'eth_getBalance',
params: [address, 'latest'],
id: 1
})
});
const data = await response.json();
return parseInt(data.result, 16) / 1e18; // Convert to ETH
}
// Get NFTs
async function getNFTs(owner) {
const url = `https://eth-mainnet.g.alchemy.com/nft/v3/${apiKey}/getNFTsForOwner?owner=${owner}`;
const response = await fetch(url);
return await response.json();
}
npm install alchemy-sdk
import { Alchemy, Network } from 'alchemy-sdk';
const alchemy = new Alchemy({
apiKey: process.env.ALCHEMY_API_KEY,
network: Network.ETH_MAINNET
});
// Get NFTs
const nfts = await alchemy.nft.getNftsForOwner('vitalik.eth');
console.log(nfts.ownedNfts);
// Get token balances
const balances = await alchemy.core.getTokenBalances('vitalik.eth');
console.log(balances);
// Get transaction history
const transfers = await alchemy.core.getAssetTransfers({
toAddress: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
category: ['external', 'erc20']
});
Receive HTTP POST requests when onchain events happen.
| Type | Use Case | |------|----------| | Address Activity | Track transfers to/from specific addresses | | NFT Activity | Track NFT sales, transfers, mints | | Mined Transactions | Track when your txs are mined | | Dropped Transactions | Get notified if tx is dropped | | Gas Price | Alert on gas price thresholds |
{
"webhookId": "wh_abc123",
"id": "evt_xyz789",
"createdAt": "2024-01-15T12:00:00.000Z",
"type": "ADDRESS_ACTIVITY",
"event": {
"network": "ETH_MAINNET",
"activity": [{
"fromAddress": "0x123...",
"toAddress": "0x456...",
"value": 1.5,
"asset": "ETH"
}]
}
}
# Get all assets for a wallet
./alchemy.sh balance 0x... # ETH balance
./alchemy.sh tokens 0x... # ERC-20 tokens
./alchemy.sh nfts 0x... # NFTs
# Get full tx history for address
./alchemy.sh transfers 0x... --category external,erc20,erc721
# Get all NFTs in a collection
./alchemy.sh collection 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
# Check same address across chains
for chain in eth-mainnet polygon-mainnet arb-mainnet base-mainnet; do
echo "=== $chain ==="
./alchemy.sh --chain $chain balance 0x...
done
| Plan | Compute Units/sec | Monthly CUs | |------|-------------------|-------------| | Free | 330 | 300M | | Growth | 660 | Unlimited | | Scale | Custom | Custom |
Most endpoints cost 1-50 CUs. Check alchemy.com/docs/rate-limits for details.
// Rate limited
{"error": {"code": 429, "message": "Too Many Requests"}}
// Invalid API key
{"error": {"code": 401, "message": "Invalid API Key"}}
// Invalid params
{"error": {"code": -32602, "message": "Invalid params"}}
---
Built by GizmoLab 🔧
GizmoLab is a Web3 development agency building dApps, smart contracts, and blockchain tools.
Need custom blockchain development? Get in touch
The skill is designed for both human developers AND AI agents. See references/agent-workflows.md for complete examples:
QUERY → STORE → ANALYZE → DECIDE → ACT → REPEAT
Example cron job for an agent:
# Every hour, check whale activity and alert if >100 ETH moved
0 * * * * ~/.openclaw/workspace/skills/alchemy-web3/scripts/whale-tracker.sh
references/nft-api.md - Full NFT API referencereferences/token-api.md - Full Token API referencereferences/node-api.md - Full Node API referencereferences/chains.md - All supported chainsreferences/agent-workflows.md - AI agent automation examples安装 Alchemy Web3 后,可以对 AI 说这些话来触发它
Help me get started with Alchemy Web3
Explains what Alchemy Web3 does, walks through the setup, and runs a quick demo based on your current project
Use Alchemy Web3 to interact with Alchemy's Web3 APIs for blockchain data, NFTs, tokens...
Invokes Alchemy Web3 with the right parameters and returns the result directly in the conversation
What can I do with Alchemy Web3 in my finance & investment workflow?
Lists the top use cases for Alchemy Web3, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/alchemy-web3/ 目录(个人级,所有项目可用),或 .claude/skills/alchemy-web3/(项目级)。重启 AI 客户端后,用 /alchemy-web3 主动调用,或让 AI 根据上下文自动发现并使用。
Alchemy Web3 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Alchemy Web3 可免费安装使用。请查阅仓库了解许可证信息。
Interact with Alchemy's Web3 APIs for blockchain data, NFTs, tokens, transfers, and webhooks across 80+ chains.
Alchemy Web3 属于「Finance & Investment」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my finance & investment tasks using Alchemy Web3
Identifies repetitive steps in your workflow and sets up Alchemy Web3 to handle them automatically