E5CF GitHub - evgyur/crypto-price: πŸ“ˆ Clawdbot skill for cryptocurrency price lookup and candlestick chart generation
[go: up one dir, main page]

Skip to content

πŸ“ˆ Clawdbot skill for cryptocurrency price lookup and candlestick chart generation

License

Notifications You must be signed in to change notification settings

evgyur/crypto-price

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ˆ Crypto Price & Chart

A Clawdbot skill for fetching cryptocurrency token prices and generating beautiful candlestick charts.

Features

  • πŸš€ Fast price lookup via CoinGecko and Hyperliquid APIs
  • πŸ“Š Candlestick charts with dark theme (8x8 square format)
  • ⚑ Smart caching (5-minute TTL for price data)
  • 🎯 Multiple data sources (Hyperliquid preferred for supported tokens, CoinGecko fallback)
  • πŸ“± Flexible timeframes (30m, 3h, 12h, 24h, 2d)

Installation

Via ClawdHub

clawdhub install evgyur/crypto-price

Manual Installation

  1. Clone or copy this skill to your Clawdbot workspace:

    cd ~/.clawdbot/workspace/skills
    git clone https://github.com/evgyur/crypto-price.git
  2. Ensure Python 3 is installed:

    python3 --version
  3. Install required Python packages:

    pip install matplotlib
  4. Verify installation:

    clawdbot skills info crypto-price

Usage

As a Skill

The skill is automatically triggered when users ask for:

  • Token prices
  • Crypto charts
  • Cryptocurrency market data

Direct Script Usage

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

Examples:

# Get HYPE price and 24h chart
python3 scripts/get_price_chart.py HYPE

# Get Bitcoin price and 12h chart
python3 scripts/get_price_chart.py BTC 12h

# Get Ethereum price and 3h chart
python3 scripts/get_price_chart.py ETH 3h

# Get Solana price and 30m chart
python3 scripts/get_price_chart.py SOL 30m

# Get Cardano price and 2d chart
python3 scripts/get_price_chart.py ADA 2d

Duration Format

  • 30m - 30 minutes
  • 3h - 3 hours
  • 12h - 12 hours
  • 24h - 24 hours (default)
  • 2d - 2 days

Output Format

The script returns JSON with the following structure:

{
  "symbol": "BTC",
  "token_id": "bitcoin",
  "source": "coingecko",
  "currency": "USD",
  "hours": 24.0,
  "duration_label": "24h",
  "candle_minutes": 15,
  "price": 89946.00,
  "price_usdt": 89946.00,
  "change_period": -54.00,
  "change_period_percent": -0.06,
  "chart_path": "/tmp/crypto_chart_BTC_1769142011.png",
  "text": "BTC: $89946.00 USD (-0.06% over 24h)",
  "text_plain": "BTC: $89946.00 USD (-0.06% over 24h)"
}

Chart Generation

  • Type: Candlestick (OHLC)
  • Size: 8x8 inches (square format)
  • Theme: Dark (#0f141c background)
  • Colors:
    • Green (#26a69a) for bullish candles
    • Red (#ef5350) for bearish candles
  • Output: PNG files saved to /tmp/crypto_chart_{SYMBOL}_{timestamp}.png

Data Sources

  1. Hyperliquid API (https://api.hyperliquid.xyz/info)

    • Preferred for HYPE and other Hyperliquid tokens
    • Provides real-time price data and candlestick data
  2. CoinGecko API (https://api.coingecko.com/api/v3/)

    • Fallback for all other tokens
    • Supports price lookup, market charts, and OHLC data

Caching

Price data is cached for 300 seconds (5 minutes) to reduce API calls:

  • Cache files: /tmp/crypto_price_*.json
  • Automatic cache invalidation after TTL

Supported Tokens

Works with any token supported by CoinGecko or Hyperliquid:

  • Popular tokens: BTC, ETH, SOL, ADA, DOT, LINK, MATIC, AVAX, ATOM, ALGO, XLM, XRP, LTC, BCH, ETC, TRX, XMR, DASH, ZEC, EOS, BNB, DOGE, SHIB, UNI, AAVE
  • Hyperliquid tokens: HYPE, and other tokens listed on Hyperliquid

Requirements

  • Python 3.6+
  • matplotlib library
  • Internet connection for API calls

Dependencies

pip install matplotlib

License

MIT

Author

Created for Clawdbot community. Originally part of Clawdbot bundled skills, restored and enhanced.

Contributing

Contributions welcome! Please feel free to submit a Pull Request.

Related Skills

This skill works with slash command skills:

  • /hype - HYPE token price and chart
  • /token <SYMBOL> - Any token price and chart
  • /btc, /eth, /sol, etc. - Popular tokens

Links

Changelog

v1.0.0

  • Initial release
  • Support for CoinGecko and Hyperliquid APIs
  • Candlestick chart generation
  • Smart caching system
  • Multiple timeframe support

About

πŸ“ˆ Clawdbot skill for cryptocurrency price lookup and candlestick chart generation

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0