360 Secure SkillHub
360 安全技能中心

Alchemy

封装 Alchemy API 的 Python 命令行工具,使用 ALCHEMY_API_KEY 认证,支持查询 ETH 与 ERC-20 余额、交易、区块、NFT 及元数据、事件日志、gas 价格与资产转移,结果以 JSON 输出;需联网,说明中提到的 webhooks 未实现。

aiwithabidi
aiwithabidi
热度 64.37
最近更新 2026-05-10 17:38:32
分类:数据依赖:代码执行 / 第三方 API应用场景:API 集成 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add alchemy
Metadata
name
alchemy
description
Alchemy — blockchain data, NFTs, token balances, transactions, gas prices, and webhooks.
homepage
https://www.agxntsix.ai
license
MIT
compatibility
Python 3.10+ (stdlib only — no dependencies)
metadata
{"openclaw":{"emoji":"⛓️","requires":{"env":["ALCHEMY_API_KEY"]},"primaryEnv":"ALCHEMY_API_KEY","homepage":"https://www.agxntsix.ai"}}

⛓️ Alchemy

Alchemy — blockchain data, NFTs, token balances, transactions, gas prices, and webhooks.

Requirements

Variable Required Description
ALCHEMY_API_KEY ✅ Alchemy API key

Quick Start

# Get ETH balance
python3 {{baseDir}}/scripts/alchemy.py get-balance --address <value>

# Get ERC-20 token balances
python3 {{baseDir}}/scripts/alchemy.py get-token-balances --address <value>

# Get transaction by hash
python3 {{baseDir}}/scripts/alchemy.py get-transaction --hash <value>

# Get block by number
python3 {{baseDir}}/scripts/alchemy.py get-block --block "latest"

# Get NFTs for address
python3 {{baseDir}}/scripts/alchemy.py get-nfts --address <value>

# Get NFT metadata
python3 {{baseDir}}/scripts/alchemy.py get-nft-metadata --contract <value> --token-id <value>

# Get token metadata
python3 {{baseDir}}/scripts/alchemy.py get-token-metadata --contract <value>

# Get current gas price
python3 {{baseDir}}/scripts/alchemy.py get-gas-price

# Get latest block number
python3 {{baseDir}}/scripts/alchemy.py get-block-number

# Get event logs
python3 {{baseDir}}/scripts/alchemy.py get-logs --address <value> --from-block "0x0" --to-block "latest" --topics <value>

# Get asset transfers for address
python3 {{baseDir}}/scripts/alchemy.py get-asset-transfers --address <value> --category "external,erc20"

# Get NFT floor price
python3 {{baseDir}}/scripts/alchemy.py get-floor-price --contract <value>

Output Format

All commands output JSON by default.

Script Reference

Script Description
{baseDir}/scripts/alchemy.py Main CLI — all commands in one tool

Credits

Built by M. Abidi | agxntsix.ai YouTube | GitHub Part of the AgxntSix Skill Suite for OpenClaw agents.

📅 Need help setting up OpenClaw for your business? Book a free consultation