360 Secure SkillHub
360 安全技能中心

Crypto Price

通过 CoinGecko 或 Hyperliquid API 查询加密货币代币当前价格与周期涨跌幅,并用 Python 脚本生成暗色主题 PNG K线图,返回价格、涨跌幅、图表路径和文本描述。

分类:数据
evgyur
evgyur
热度 59.36
最近更新 2026-05-11 15:50:48

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add evgyur/crypto-price
兼容性
Clawdbot 专属
联网要求
需要联网
数据出网
必须出网
Metadata
name
crypto-price
description
Get cryptocurrency token price and generate candlestick charts via CoinGecko API or Hyperliquid API. Use when user asks for token price, crypto price, price chart, or cryptocurrency market data.
metadata
{"clawdbot":{"emoji":"📈","requires":{"bins":["python3"]}}}

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):
You must send the chart as a photo, not as text. In your reply, output text_plain and on a new line: MEDIA: followed by the exact chart_path value (e.g. MEDIA: /tmp/crypto_chart_HYPE_1769204734.png). Clawdbot will attach that file as an image. Do not write [chart: path] or any other text placeholder — only the MEDIA: <chart_path> line makes the image appear.

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.