A comprehensive multi-chain blockchain analysis tool using live API data:
All commands return JSON with optional human-readable formatting.
This skill respects your privacy and operates transparently:
External data collection: None. Only standard blockchain APIs receive your queries:
api.etherscan.io (Etherscan V2)blockchair.com (Blockchair)Local caching: API responses are cached for 5 minutes to respect rate limits. Cache files are stored in ~/.openclaw/cache/crypto-analytics/api_responses/ and may contain queried addresses, transaction hashes, and other public blockchain data you requested. Files are automatically expired and can be manually deleted. This data never leaves your machine.
Environment variables: Optionally reads ETHERSCAN_API_KEY from a .env file located in the OpenClaw workspace root. No other environment variables are accessed.
No subprocesses or dynamic code execution: Pure Python with requests library only.
You can audit the source code in scripts/crypto_api.py – it's straightforward HTTP + JSON.
Set ETHERSCAN_API_KEY to increase rate limits (free tier: 5 calls/sec). Get a key from https://etherscan.io/apis
bash
export ETHERSCAN_API_KEY=your_key_here
# Or add to ~/.openclaw/workspace/.env
balance <address> [chain]#Get native token balance for a wallet.
Parameters:
address - Blockchain address
chain (optional) - Chain identifier. Auto-detects from address format if omitted.
ethereum, sepolia, bsc, polygon, arbitrum, base, optimism, avalanche, and morebitcoin, solanaExample:
bash
crypto-analytics balance 0x742d35Cc6634C0532925a3b8D4C9db96C4b4Db45 ethereum
Output:
json
{
"chain": "ethereum",
"chainid": 1,
"address": "0x742d35cc6634c0532925a3b8d4c9db96c4b4db45",
"balance_wei": 1234567890000000000,
"balance_native": 1.23456789,
"formatted_balance": "1.234568 ETH"
}
transactions <address> [chain] [limit=20]#Get recent transaction history.
Parameters:
address - Wallet addresschain (optional) - Chain identifier (auto-detected if omitted)limit (optional) - Maximum transactions to return (default 20, max 100)Example:
bash
crypto-analytics transactions 0x742d35Cc6634C0532925a3b8D4C9db96C4b4Db45 bsc 50
Output:
json
{
"chain": "bsc",
"chainid": 56,
"address": "...",
"count": 150,
"transactions": [ /* array of tx objects */ ]
}
tx <txhash> <chain>#Get full transaction details.
Parameters:
txhash - Transaction hashchain - Chain identifier (required)Example:
bash
crypto-analytics tx 0x123abc... ethereum
Output:
json
{
"chain": "ethereum",
"chainid": 1,
"txhash": "0x123abc...",
"transaction": { /* full tx object */ }
}
validate <address>#Check address validity and detect chain.
Parameters:
address - Address to validateExample:
bash
crypto-analytics validate bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
Output:
json
{
"valid": true,
"chain": "bitcoin",
"normalized": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
"error": null
}
chains#List all supported blockchains with their specs.
Example:
bash
crypto-analytics chains
gas [chain=ethereum]#Get current gas price estimates including Safe, Standard, and Fast rates, plus base fee (EIP-1559).
Parameters:
chain (optional) - Chain identifier (default: ethereum)Example:
bash
crypto-analytics gas ethereum
Output:
json
{
"chain": "ethereum",
"chainid": 1,
"low": 20000000000,
"standard": 50000000000,
"fast": 80000000000,
"base_fee": 15000000000,
"timestamp": 1700000000,
"formatted": "=== Gas Price Tracker ===\nSafe: 20.00 Gwei\nStandard: 50.00 Gwei\nFast: 80.00 Gwei\nBase Fee: 15.00 Gwei\nUpdated: 2023-11-14 10:00:00 UTC"
}
token <address> <token_contract> [chain]#Get ERC-20 token balance for a specific token contract, with symbol and formatted human-readable value.
Parameters:
address - Wallet addresstoken_contract - ERC-20 token contract addresschain (optional) - Chain identifier (auto-detected if omitted)Example:
bash
crypto-analytics token 0xYourAddress 0xA0b86991c6218b36c1d19D4a2e9bB0e3606EB48 ethereum
Output:
json
{
"chain": "ethereum",
"contract": "0xa0b86991c6218b36c1d19d4a2e9bb0e3606eb48",
"owner": "0xYourAddress",
"balance": 1000000,
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"formatted": "=== Token Balances ===\nUSDC (USD Coin)\n Balance: 1.000000\n Contract: 0xa0b86991c6218b36c1d19d4a2e9bb0e3606eb48\n"
}
tokens <address> [chain] [limit=20]#Get all ERC-20 token balances for a wallet by auto-discovering tokens from recent transfer history. Returns non-zero balances with symbols and decimals.
Parameters:
address - Wallet addresschain (optional) - Chain identifier (auto-detected if omitted)limit (optional) - Maximum number of tokens to check (default 20)Example:
bash
crypto-analytics tokens 0xYourAddress ethereum 10
Output:
json
{
"chain": "ethereum",
"address": "0xYourAddress",
"count": 2,
"tokens": [
{
"contract": "0xa0b86991c6218b36c1d19d4a2e9bb0e3606eb48",
"balance": 1000000,
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6
},
{
"contract": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"balance": 500000,
"symbol": "USDT",
"name": "Tether USD",
"decimals": 6
}
],
"formatted": "=== Token Balances ===\nUSDC (USD Coin)\n Balance: 1.000000\n Contract: 0xa0b8...\nUSDT (Tether USD)\n Balance: 0.500000\n Contract: 0xdac1..."
}
spl-tokens <owner>#Get SPL token accounts for a Solana wallet. Returns mint addresses and token amounts (human-readable).
Parameters:
owner - Solana wallet address (Base58)Example:
bash
crypto-analytics spl-tokens 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
Output:
json
{
"owner": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"tokens": [
{
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": 10.5,
"decimals": 9
}
],
"formatted": "Owner: 7xKX...\\nToken count: 1\\n EPjF...: 10.50000000\\n"
}
Use crypto-analytics when you need to:
"Check my ETH balance"
balance 0x... ethereumor auto-detect if address starts with 0x
"How much BNB do I have on BSC?"
balance 0x... bsc
"Show me recent transactions for this Bitcoin address"
transactions 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa bitcoin
"Is this a valid address and what chain is it on?"
validate <address>
"What chains do you support?"
chains
"Get details for tx 0xabc... on Arbitrum"
tx 0xabc... arbitrum
"Check my USDC balance on Ethereum"
token 0x... 0xA0b86991c6218b36c1d19D4a2e9bB0e3606EB48 ethereum
"Show all tokens I have on Ethereum"
tokens 0x... ethereum
"What's the current gas price on Arbitrum?"
gas arbitrum
~/.openclaw/cache/crypto-analytics/api_responses/Set API keys in .env:
bash
ETHERSCAN_API_KEY=YourEtherscanKeyHere
Key optional for low-volume usage but recommended.
See references/api_index.md for full API documentation and references/chains.md for chain specifications.
Current limitations:
Planned enhancements:
This skill bundles useful reference material:
references/chains.md - Chain specifications, address formats, explorersreferences/api_index.md - API endpoints, parameters, examplesThese files are loaded into context only when needed.