SKILL.md
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/getpricechart.py HYPEpython3 {baseDir}/scripts/getpricechart.py HYPE 12hpython3 {baseDir}/scripts/getpricechart.py BTC 3hpython3 {baseDir}/scripts/getpricechart.py ETH 30mpython3 {baseDir}/scripts/getpricechart.py SOL 2d
Duration format: 30m, 3h, 12h, 24h (default), 2d
Output
Returns JSON with:
price- Current price in USD/USDTchangeperiodpercent- Price change percentage for the periodchart_path- Path to generated PNG chart (if available)text_plain- Formatted text description
Chart as image (always when chartpath is present): You must send the chart as a photo, not as text. In your reply, output textplain and on a new line: MEDIA: followed by the exact chartpath value (e.g. MEDIA: /tmp/cryptochartHYPE1769204734.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/cryptochart{SYMBOL}_{timestamp}.png
Data Sources
- Hyperliquid API - For HYPE and other Hyperliquid tokens (preferred)
- CoinGecko API - Fallback for other tokens
Price data cached for 300 seconds (5 minutes) in /tmp/cryptoprice*.json.