{
  "schemaVersion": "1.0",
  "item": {
    "slug": "onchain",
    "name": "Onchain CLI",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/arein/onchain",
    "canonicalUrl": "https://clawhub.ai/arein/onchain",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/onchain",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=onchain",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/onchain"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/onchain",
    "agentPageUrl": "https://openagent3.xyz/skills/onchain/agent",
    "manifestUrl": "https://openagent3.xyz/skills/onchain/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/onchain/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Onchain CLI",
        "body": "CLI for crypto portfolio tracking, market data, and CEX history."
      },
      {
        "title": "First-Time Setup (Required)",
        "body": "Before using most features, users must configure their API keys:\n\nonchain setup\n\nThis interactive wizard helps configure:\n\nCoinbase/Binance - For CEX balances and trade history\nDeBank - For EVM wallet data (Ethereum, Polygon, Arbitrum, etc.)\nHelius - For Solana wallet data\n\nWithout setup: Only onchain price and onchain markets work (using free CoinGecko tier).\n\nVerify setup: Run onchain test to check which providers are configured and working.\n\nAgent note: If a command fails with \"not configured\" or \"API key required\", guide the user to run onchain setup first, then onchain test to verify."
      },
      {
        "title": "Invocation",
        "body": "onchain <command>"
      },
      {
        "title": "Market Data",
        "body": "onchain price <token>         # Token price (btc, eth, sol, etc.)\nonchain markets               # Market overview with trending\nonchain search <query>        # Search tokens by name or symbol\nonchain gas                   # Current gas prices (Ethereum default)\nonchain gas --chain polygon   # Gas prices for other EVM chains"
      },
      {
        "title": "Wallet Data",
        "body": "onchain balance [address]           # Token balances (auto-detects EVM/Solana)\nonchain balance --chain polygon     # Filter by chain\nonchain history [address]           # Transaction history\nonchain portfolio [address]         # Full portfolio with DeFi positions"
      },
      {
        "title": "Transaction Lookup",
        "body": "onchain tx <hash>                   # Lookup transaction details (auto-detects chain)\nonchain tx <hash> --chain base      # Specify chain explicitly\nonchain tx <explorer-url>           # Paste block explorer URL directly\n\nSupports EVM chains (Ethereum, Polygon, Base, Arbitrum, Optimism, BSC, Avalanche, Fantom) and Solana. Accepts raw hashes or explorer URLs (etherscan.io, basescan.org, solscan.io, etc.).\n\nExample Output\n\nTransaction Details\n\n✓ Status: SUCCESS\n  Hash:  0xd757...5f31\n  Chain: Base\n  Block: 41,310,593\n  Time:  Jan 26, 2026, 01:55 PM (4h ago)\n\nAddresses\n  From: 0xc4e7263dd870a29f1cfe438d1a7db48547b16888\n  To:   0xab98b760e5ad88521a97c0f87a3f6eef8c42641d\n\nValue & Fee\n  Value: 0 ETH\n  Fee:   3.62e-7 ETH\n  Gas:   96,893 / 249,604 (39%)\n\nMethod\n  ID: 0x6a761202\n\n🔗 https://basescan.org/tx/0xd757...\n\nThis output contains all available transaction data. The CLI queries Etherscan/Solscan APIs directly - there is no additional data available from other sources."
      },
      {
        "title": "CEX Data",
        "body": "onchain coinbase balance      # Coinbase balances\nonchain coinbase history      # Coinbase trade history\nonchain binance balance       # Binance balances\nonchain binance history       # Binance trade history"
      },
      {
        "title": "Prediction Markets",
        "body": "onchain polymarket tags              # List all available tags/categories\nonchain polymarket tags --popular    # Show popular tags by market count\nonchain polymarket trending          # Trending markets (respects config filters)\nonchain polymarket trending --all    # Show all markets (ignore config filters)\nonchain polymarket trending --exclude sports,nfl   # Exclude specific tags\nonchain polymarket trending --include crypto,ai    # Only show specific tags\nonchain polymarket search <query>    # Search markets (respects config filters)\nonchain polymarket view <slug>       # View market details\nonchain polymarket sentiment <topic> # Analyze market sentiment for a topic\n\nSentiment analysis: Analyzes prediction markets to determine bullish/bearish expectations:\n\nonchain polymarket sentiment fed        # Fed rate expectations\nonchain polymarket sentiment bitcoin    # Bitcoin market sentiment\nonchain polymarket sentiment ai         # AI-related predictions\nonchain polymarket sentiment trump      # Political sentiment\nonchain polymarket sentiment fed --json # JSON output for agents\n\nTag filtering: Configure default excludes in ~/.config/onchain/config.json5:\n\n{\n  \"polymarket\": {\n    \"excludeTags\": [\"sports\", \"nfl\", \"nba\", \"mlb\"],\n    \"includeTags\": []  // empty = all non-excluded\n  }\n}"
      },
      {
        "title": "Configuration",
        "body": "onchain setup                 # Interactive setup wizard\nonchain config                # View current config\nonchain config wallet add <name> <address>\nonchain config wallet set-default <name>"
      },
      {
        "title": "Global Options",
        "body": "--json - Output as JSON (agent-friendly)\n--plain - Disable colors and emoji\n--timeout <ms> - Request timeout"
      },
      {
        "title": "Configuration",
        "body": "Config file: ~/.config/onchain/config.json5"
      },
      {
        "title": "Required API Keys",
        "body": "FeatureAPI KeyGet KeyEVM walletsDEBANK_API_KEYDeBankSolana walletsHELIUS_API_KEYHeliusCoinbase CEXCOINBASE_API_KEY + COINBASE_API_SECRETCoinbaseBinance CEXBINANCE_API_KEY + BINANCE_API_SECRETBinance"
      },
      {
        "title": "Optional API Keys",
        "body": "FeatureAPI KeyNotesMarket dataCOINGECKO_API_KEYFree tier works, Pro for higher limitsMarket fallbackCOINMARKETCAP_API_KEYAlternative market data sourceEVM tx lookupETHERSCAN_API_KEYFor onchain tx on EVM chainsSolana tx lookupSOLSCAN_API_KEYFor onchain tx on Solana"
      },
      {
        "title": "Get Bitcoin price",
        "body": "onchain price btc"
      },
      {
        "title": "Check wallet balance",
        "body": "onchain balance 0x1234...5678"
      },
      {
        "title": "View portfolio with DeFi positions",
        "body": "onchain portfolio main  # Uses saved wallet named \"main\""
      },
      {
        "title": "Get trending prediction markets",
        "body": "onchain polymarket trending -n 5             # Top 5 (respects config filters)\nonchain polymarket trending --all            # All markets, ignore config\nonchain polymarket trending --exclude sports # Filter out sports on-the-fly"
      },
      {
        "title": "Lookup a transaction",
        "body": "onchain tx 0xd757e7e4cdb424e22319cbf63bbcfcd4b26c93ebef31d1458ab7d5e986375f31\nonchain tx https://basescan.org/tx/0x...  # Or paste explorer URL"
      },
      {
        "title": "Search for tokens",
        "body": "onchain search pepe               # Find tokens matching \"pepe\"\nonchain search \"shiba inu\" -l 5   # Limit to 5 results"
      },
      {
        "title": "Check gas prices",
        "body": "onchain gas                   # Ethereum gas prices\nonchain gas --chain polygon   # Polygon gas prices\nonchain gas --json            # JSON output"
      },
      {
        "title": "JSON output for scripts",
        "body": "onchain --json price eth | jq '.priceUsd'"
      },
      {
        "title": "EVM (via DeBank)",
        "body": "Ethereum, BNB Chain, Polygon, Arbitrum, Optimism, Avalanche, Base, zkSync Era, Linea, Scroll, Blast, Mantle, Gnosis, Fantom, Celo, and more."
      },
      {
        "title": "Solana (via Helius)",
        "body": "Full Solana mainnet support including SPL tokens and NFTs."
      },
      {
        "title": "Agent Integration",
        "body": "This CLI is designed for agent use. Key patterns:\n\nAlways use --json for programmatic access\nCheck exit codes - 0 for success, 1 for error\nUse saved wallets - Configure once with onchain setup, reference by name\nRate limiting - APIs have rate limits, add delays between rapid calls"
      },
      {
        "title": "Example Agent Usage",
        "body": "# Get portfolio value\nVALUE=$(onchain --json portfolio main | jq -r '.totalValueUsd')\n\n# Get price with change\nonchain --json price btc | jq '{price: .priceUsd, change24h: .priceChange24h}'\n\n# Check if market is bullish\nCHANGE=$(onchain --json markets | jq '.marketCapChange24h')\n\n# Get transaction details as JSON\nTX=$(onchain --json tx 0x... --chain base)\necho $TX | jq '{status: .status, from: .from, to: .to, method: .methodId}'"
      },
      {
        "title": "Transaction Lookup Guidance",
        "body": "IMPORTANT: Trust the CLI output. The onchain tx command queries Etherscan (EVM) or Solscan (Solana) APIs directly and returns all available data.\n\nDO NOT:\n\nUse curl to hit Etherscan/Basescan APIs directly\nUse cast or other CLI tools as \"fallbacks\"\nUse WebFetch to scrape block explorer websites\nAssume the CLI is missing data - it returns everything available\n\nDO:\n\nUse onchain tx <hash> or onchain tx <explorer-url>\nUse --json for structured data parsing\nInterpret the output directly to answer user questions\n\nExample interpretation:\n\nonchain tx 0x... --chain base\n\nIf output shows Status: SUCCESS, From: 0x..., To: 0x..., Method ID: 0x6a761202 - that's a successful contract interaction. The method ID 0x6a761202 is execTransaction (Gnosis Safe). No additional lookups needed."
      }
    ],
    "body": "Onchain CLI\n\nCLI for crypto portfolio tracking, market data, and CEX history.\n\nFirst-Time Setup (Required)\n\nBefore using most features, users must configure their API keys:\n\nonchain setup\n\n\nThis interactive wizard helps configure:\n\nCoinbase/Binance - For CEX balances and trade history\nDeBank - For EVM wallet data (Ethereum, Polygon, Arbitrum, etc.)\nHelius - For Solana wallet data\n\nWithout setup: Only onchain price and onchain markets work (using free CoinGecko tier).\n\nVerify setup: Run onchain test to check which providers are configured and working.\n\nAgent note: If a command fails with \"not configured\" or \"API key required\", guide the user to run onchain setup first, then onchain test to verify.\n\nInvocation\nonchain <command>\n\nCommands\nMarket Data\nonchain price <token>         # Token price (btc, eth, sol, etc.)\nonchain markets               # Market overview with trending\nonchain search <query>        # Search tokens by name or symbol\nonchain gas                   # Current gas prices (Ethereum default)\nonchain gas --chain polygon   # Gas prices for other EVM chains\n\nWallet Data\nonchain balance [address]           # Token balances (auto-detects EVM/Solana)\nonchain balance --chain polygon     # Filter by chain\nonchain history [address]           # Transaction history\nonchain portfolio [address]         # Full portfolio with DeFi positions\n\nTransaction Lookup\nonchain tx <hash>                   # Lookup transaction details (auto-detects chain)\nonchain tx <hash> --chain base      # Specify chain explicitly\nonchain tx <explorer-url>           # Paste block explorer URL directly\n\n\nSupports EVM chains (Ethereum, Polygon, Base, Arbitrum, Optimism, BSC, Avalanche, Fantom) and Solana. Accepts raw hashes or explorer URLs (etherscan.io, basescan.org, solscan.io, etc.).\n\nExample Output\nTransaction Details\n\n✓ Status: SUCCESS\n  Hash:  0xd757...5f31\n  Chain: Base\n  Block: 41,310,593\n  Time:  Jan 26, 2026, 01:55 PM (4h ago)\n\nAddresses\n  From: 0xc4e7263dd870a29f1cfe438d1a7db48547b16888\n  To:   0xab98b760e5ad88521a97c0f87a3f6eef8c42641d\n\nValue & Fee\n  Value: 0 ETH\n  Fee:   3.62e-7 ETH\n  Gas:   96,893 / 249,604 (39%)\n\nMethod\n  ID: 0x6a761202\n\n🔗 https://basescan.org/tx/0xd757...\n\n\nThis output contains all available transaction data. The CLI queries Etherscan/Solscan APIs directly - there is no additional data available from other sources.\n\nCEX Data\nonchain coinbase balance      # Coinbase balances\nonchain coinbase history      # Coinbase trade history\nonchain binance balance       # Binance balances\nonchain binance history       # Binance trade history\n\nPrediction Markets\nonchain polymarket tags              # List all available tags/categories\nonchain polymarket tags --popular    # Show popular tags by market count\nonchain polymarket trending          # Trending markets (respects config filters)\nonchain polymarket trending --all    # Show all markets (ignore config filters)\nonchain polymarket trending --exclude sports,nfl   # Exclude specific tags\nonchain polymarket trending --include crypto,ai    # Only show specific tags\nonchain polymarket search <query>    # Search markets (respects config filters)\nonchain polymarket view <slug>       # View market details\nonchain polymarket sentiment <topic> # Analyze market sentiment for a topic\n\n\nSentiment analysis: Analyzes prediction markets to determine bullish/bearish expectations:\n\nonchain polymarket sentiment fed        # Fed rate expectations\nonchain polymarket sentiment bitcoin    # Bitcoin market sentiment\nonchain polymarket sentiment ai         # AI-related predictions\nonchain polymarket sentiment trump      # Political sentiment\nonchain polymarket sentiment fed --json # JSON output for agents\n\n\nTag filtering: Configure default excludes in ~/.config/onchain/config.json5:\n\n{\n  \"polymarket\": {\n    \"excludeTags\": [\"sports\", \"nfl\", \"nba\", \"mlb\"],\n    \"includeTags\": []  // empty = all non-excluded\n  }\n}\n\nConfiguration\nonchain setup                 # Interactive setup wizard\nonchain config                # View current config\nonchain config wallet add <name> <address>\nonchain config wallet set-default <name>\n\nGlobal Options\n--json - Output as JSON (agent-friendly)\n--plain - Disable colors and emoji\n--timeout <ms> - Request timeout\nConfiguration\n\nConfig file: ~/.config/onchain/config.json5\n\nRequired API Keys\nFeature\tAPI Key\tGet Key\nEVM wallets\tDEBANK_API_KEY\tDeBank\nSolana wallets\tHELIUS_API_KEY\tHelius\nCoinbase CEX\tCOINBASE_API_KEY + COINBASE_API_SECRET\tCoinbase\nBinance CEX\tBINANCE_API_KEY + BINANCE_API_SECRET\tBinance\nOptional API Keys\nFeature\tAPI Key\tNotes\nMarket data\tCOINGECKO_API_KEY\tFree tier works, Pro for higher limits\nMarket fallback\tCOINMARKETCAP_API_KEY\tAlternative market data source\nEVM tx lookup\tETHERSCAN_API_KEY\tFor onchain tx on EVM chains\nSolana tx lookup\tSOLSCAN_API_KEY\tFor onchain tx on Solana\nExamples\nGet Bitcoin price\nonchain price btc\n\nCheck wallet balance\nonchain balance 0x1234...5678\n\nView portfolio with DeFi positions\nonchain portfolio main  # Uses saved wallet named \"main\"\n\nGet trending prediction markets\nonchain polymarket trending -n 5             # Top 5 (respects config filters)\nonchain polymarket trending --all            # All markets, ignore config\nonchain polymarket trending --exclude sports # Filter out sports on-the-fly\n\nLookup a transaction\nonchain tx 0xd757e7e4cdb424e22319cbf63bbcfcd4b26c93ebef31d1458ab7d5e986375f31\nonchain tx https://basescan.org/tx/0x...  # Or paste explorer URL\n\nSearch for tokens\nonchain search pepe               # Find tokens matching \"pepe\"\nonchain search \"shiba inu\" -l 5   # Limit to 5 results\n\nCheck gas prices\nonchain gas                   # Ethereum gas prices\nonchain gas --chain polygon   # Polygon gas prices\nonchain gas --json            # JSON output\n\nJSON output for scripts\nonchain --json price eth | jq '.priceUsd'\n\nSupported Chains\nEVM (via DeBank)\n\nEthereum, BNB Chain, Polygon, Arbitrum, Optimism, Avalanche, Base, zkSync Era, Linea, Scroll, Blast, Mantle, Gnosis, Fantom, Celo, and more.\n\nSolana (via Helius)\n\nFull Solana mainnet support including SPL tokens and NFTs.\n\nAgent Integration\n\nThis CLI is designed for agent use. Key patterns:\n\nAlways use --json for programmatic access\nCheck exit codes - 0 for success, 1 for error\nUse saved wallets - Configure once with onchain setup, reference by name\nRate limiting - APIs have rate limits, add delays between rapid calls\nExample Agent Usage\n# Get portfolio value\nVALUE=$(onchain --json portfolio main | jq -r '.totalValueUsd')\n\n# Get price with change\nonchain --json price btc | jq '{price: .priceUsd, change24h: .priceChange24h}'\n\n# Check if market is bullish\nCHANGE=$(onchain --json markets | jq '.marketCapChange24h')\n\n# Get transaction details as JSON\nTX=$(onchain --json tx 0x... --chain base)\necho $TX | jq '{status: .status, from: .from, to: .to, method: .methodId}'\n\nTransaction Lookup Guidance\n\nIMPORTANT: Trust the CLI output. The onchain tx command queries Etherscan (EVM) or Solscan (Solana) APIs directly and returns all available data.\n\nDO NOT:\n\nUse curl to hit Etherscan/Basescan APIs directly\nUse cast or other CLI tools as \"fallbacks\"\nUse WebFetch to scrape block explorer websites\nAssume the CLI is missing data - it returns everything available\n\nDO:\n\nUse onchain tx <hash> or onchain tx <explorer-url>\nUse --json for structured data parsing\nInterpret the output directly to answer user questions\n\nExample interpretation:\n\nonchain tx 0x... --chain base\n\n\nIf output shows Status: SUCCESS, From: 0x..., To: 0x..., Method ID: 0x6a761202 - that's a successful contract interaction. The method ID 0x6a761202 is execTransaction (Gnosis Safe). No additional lookups needed."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/arein/onchain",
    "publisherUrl": "https://clawhub.ai/arein/onchain",
    "owner": "arein",
    "version": "0.3.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/onchain",
    "downloadUrl": "https://openagent3.xyz/downloads/onchain",
    "agentUrl": "https://openagent3.xyz/skills/onchain/agent",
    "manifestUrl": "https://openagent3.xyz/skills/onchain/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/onchain/agent.md"
  }
}