← 返回
未分类 中文

Crypto Chart

Get cryptocurrency token price and generate candlestick charts via CoinGecko API or Hyperliquid API. Use when user asks for token price, crypto price, price...
获取加密货币代币价格并通过CoinGecko API或Hyperliquid API生成K线图,用于用户询问代币价格、加密货币价格、价格的情况。
redf426 redf426 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 291
下载
💾 0
安装
1
版本
#latest

概述

Crypto Price & Chart

Get cryptocurrency token price and generate candlestick charts.

Usage

Execute the script with token symbol and optional duration:

python3 {baseDir}/scripts/get_price_chart.py <SYMBOL> [duration]

Examples:

  • python3 {baseDir}/scripts/get_price_chart.py HYPE
  • python3 {baseDir}/scripts/get_price_chart.py HYPE 12h
  • python3 {baseDir}/scripts/get_price_chart.py BTC 3h
  • python3 {baseDir}/scripts/get_price_chart.py ETH 30m
  • python3 {baseDir}/scripts/get_price_chart.py SOL 2d

Duration format: 30m, 3h, 12h, 24h (default), 2d

Output

Returns JSON with:

  • price - Current price in USD/USDT
  • change_period_percent - Price change percentage for the period
  • chart_path - Path to generated PNG chart (if available)
  • text_plain - Formatted text description

Chart as image (always when chart_path is present):

In OpenClaw, send the image via message tool (not plain text placeholder):

  1. Copy from /tmp to workspace: cp ./crypto_chart__.png
  2. Send: message(action="send", filePath="./crypto_chart__.png", message="")
  3. MANDATORY cleanup — run both commands regardless of send result:
    • rm ./crypto_chart__.png
    • rm
  4. Reply NO_REPLY.

Do not skip step 3. Files left in workspace accumulate and waste disk space.

Chart Details

  • Format: Candlestick chart (8x8 square)
  • Theme: Dark (#0f141c background)
  • Output: /tmp/crypto_chart_{SYMBOL}_{timestamp}.png

Data Sources

  1. Hyperliquid API - For HYPE and other Hyperliquid tokens (preferred)
  2. CoinGecko API - Fallback for other tokens

Price data cached for 300 seconds (5 minutes) in /tmp/crypto_price_*.json.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 22:03 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Chromium

redf426
启动持久化无头Chromium并开启远程调试(CDP),用于浏览器自动化——页面导航、点击、表单填写、截图以及Cookie管理等...
★ 1 📥 534

graphviz

redf426
根据自然语言描述,使用Graphviz DOT 生成架构图、流程图、依赖图、状态机及其他可视化图表
★ 0 📥 445

Vizboard

redf426
生成精美的自包含HTML仪表盘和可视化页面——架构图、流程图、KPI仪表盘、数据表、差异对比、计划评审
★ 0 📥 347