← Back to Skills Marketplace
yongtaop1-sys

Crypto Price Monitor

by yongtaop1-sys · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
158
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install crypto-price-monitor
Description
Monitor cryptocurrency prices and trigger alerts when thresholds are hit. Supports BTC, ETH, SOL, and 100+ other coins via CoinGecko API. Configure price cei...
README (SKILL.md)

Crypto Price Alerts

Monitor cryptocurrency prices and get alerts when targets are hit. No API key required — uses CoinGecko's free API.

What It Does

  • Checks current prices for BTC, ETH, SOL, and 100+ coins
  • Compares against your configured thresholds
  • Alerts when price crosses above/below targets
  • Supports percentage moves (e.g., "alert if BTC drops 5% in 1 hour")
  • Can run once or on a schedule (cron)

Quick Start

Check a Single Price

# Direct API call (no auth needed)
curl "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,solana&vs_currencies=usd&include_24hr_change=true"

Check with More Detail

curl "https://api.coingecko.com/api/v3/coins/bitcoin?localization=false&tickers=false&community_data=false&developer_data=false&sparkline=false"

Alert Configuration

Create a crypto-alerts.json file:

{
  "alerts": [
    {
      "coin": "bitcoin",
      "symbol": "btc",
      "condition": "below",
      "price": 85000,
      "message": "BTC dropped below $85K!"
    },
    {
      "coin": "bitcoin",
      "symbol": "btc",
      "condition": "above",
      "price": 100000,
      "message": "BTC crossed $100K! 🚀"
    },
    {
      "coin": "ethereum",
      "symbol": "eth",
      "condition": "below",
      "price": 3000,
      "message": "ETH below $3K"
    },
    {
      "coin": "solana",
      "symbol": "sol",
      "condition": "above",
      "price": 200,
      "message": "SOL above $200!"
    }
  ],
  "telegram_bot_token": "YOUR_BOT_TOKEN",
  "telegram_chat_id": "YOUR_CHAT_ID"
}

Python Alert Script

Save as crypto_alert.py:

#!/usr/bin/env python3
import requests
import json
import sys
import os
from datetime import datetime

COINGECKO_API = "https://api.coingecko.com/api/v3"

def get_price(coin_id):
    url = f"{COINGECKO_API}/simple/price"
    params = {
        "ids": coin_id,
        "vs_currencies": "usd",
        "include_24hr_change": "true",
        "include_last_updated_at": "true"
    }
    r = requests.get(url, params=params, timeout=10)
    r.raise_for_status()
    data = r.json()
    return data[coin_id]["usd"], data[coin_id].get("usd_24h_change", 0)

def check_alerts(alerts_config):
    triggered = []
    for alert in alerts_config.get("alerts", []):
        coin = alert["coin"]
        condition = alert["condition"]
        target = alert["price"]
        message = alert["message"]
        
        try:
            price, change_24h = get_price(coin)
        except Exception as e:
            print(f"Error fetching {coin}: {e}")
            continue
        
        should_fire = False
        if condition == "above" and price >= target:
            should_fire = True
        elif condition == "below" and price \x3C= target:
            should_fire = True
        
        if should_fire:
            triggered.append({
                "coin": coin,
                "price": price,
                "target": target,
                "condition": condition,
                "message": message,
                "change_24h": change_24h,
                "time": datetime.now().isoformat()
            })
            print(f"🚨 ALERT: {message} (Current: ${price:,.2f})")
        else:
            print(f"  {coin.upper()}: ${price:,.2f} (24h: {change_24h:+.2f}%) — {condition} ${target:,.2f}: {'✓' if should_fire else 'not triggered'}")
    
    return triggered

def send_telegram(message, bot_token, chat_id):
    if not bot_token or not chat_id:
        return
    url = f"https://api.telegram.org/bot{bot_token}/sendMessage"
    payload = {"chat_id": chat_id, "text": message, "parse_mode": "HTML"}
    requests.post(url, json=payload, timeout=10)

if __name__ == "__main__":
    config_path = os.path.join(os.path.dirname(__file__), "crypto-alerts.json")
    
    if len(sys.argv) > 1:
        config_path = sys.argv[1]
    
    if os.path.exists(config_path):
        with open(config_path) as f:
            config = json.load(f)
    else:
        print("No crypto-alerts.json found. Using default BTC/ETH/SOL check.")
        config = {
            "alerts": [
                {"coin": "bitcoin", "symbol": "btc", "condition": "above", "price": 0},
                {"coin": "ethereum", "symbol": "eth", "condition": "above", "price": 0},
                {"coin": "solana", "symbol": "sol", "condition": "above", "price": 0}
            ]
        }
    
    triggered = check_alerts(config)
    
    if triggered:
        summary = "🚨 \x3Cb>Crypto Alert Triggered\x3C/b>\
\
"
        for t in triggered:
            summary += f"{t['message']}\
"
            summary += f"Price: ${t['price']:,.2f} | 24h: {t['change_24h']:+.2f}%\
\
"
        
        bot_token = config.get("telegram_bot_token")
        chat_id = config.get("telegram_chat_id")
        if bot_token and chat_id:
            send_telegram(summary, bot_token, chat_id)
        
        with open("/tmp/crypto_alerts_triggered.json", "a") as f:
            f.write(json.dumps({"triggered": triggered, "time": datetime.now().isoformat()}) + "\
")

Usage Examples

Run Once

python3 crypto_alert.py

Run on Schedule (Cron)

# Every 15 minutes
*/15 * * * * cd /path/to/skill && python3 crypto_alert.py >> /tmp/crypto_alerts.log 2>&1

# Every hour at minute 0
0 * * * * cd /path/to/skill && python3 crypto_alert.py >> /tmp/crypto_alerts.log 2>&1

Check Specific Coin

# Bitcoin
curl "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd&include_24hr_change=true"

# Multiple coins
curl "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,solana,cardano,polkadot,avalanche-2,chainlink&vs_currencies=usd&include_24hr_change=true"

Supported Coins (Common IDs)

Symbol CoinGecko ID
BTC bitcoin
ETH ethereum
SOL solana
ADA cardano
DOT polkadot
AVAX avalanche-2
LINK chainlink
XRP ripple
DOGE dogecoin
MATIC polygon
ARB arbitrum
OP optimism

For full list: curl https://api.coingecko.com/api/v3/coins/list?per_page=250

Alert Conditions

  • above — Fire when price >= target
  • below — Fire when price \x3C= target
  • percent_up — Fire when 24h change > X% (add percent_threshold field)
  • percent_down — Fire when 24h change \x3C -X% (add percent_threshold field)

Rate Limits

CoinGecko free API:

  • ~10-30 calls/minute
  • 10,000-50,000 calls/month
  • Use caching if checking frequently
  • Add sleep(1.2) between calls to be safe

Requirements

  • requests Python library (pip install requests)
  • CoinGecko API (free, no key needed)
  • Optional: Telegram bot for push notifications
  • Optional: cron for scheduled monitoring

Tips

  1. Don't spam checks — 15-minute intervals are fine for most use cases
  2. Cache prices — Store last check to avoid redundant API calls
  3. Multiple conditions — One coin can have multiple alerts (above AND below)
  4. Logging — Always log to a file so you can review what fired

Based on real crypto monitoring work. CoinGecko API is free but respectful usage is expected.

Usage Guidance
This appears to be a straightforward CoinGecko-based alert script. Before installing/running: 1) Inspect which crypto_alert.py you will execute (manifest vs SKILL.md differ — confirm whether the script writes to /tmp and that this behavior is acceptable). 2) Do not commit your Telegram bot token/chat_id into public repos; store the config file with restrictive permissions or supply tokens at runtime. 3) Ensure Python and the 'requests' package are installed (the skill does not declare dependencies). 4) Be aware the script makes outbound HTTP requests to api.coingecko.com and api.telegram.org; run it in an environment where that network activity is acceptable. 5) If running on a schedule (cron), redirect logs to a path you control and monitor disk usage of any files the script writes. If you want stricter secret handling, modify the script to read the Telegram token from a protected environment variable rather than a plain JSON file.
Capability Analysis
Type: OpenClaw Skill Name: crypto-price-monitor Version: 1.0.0 The skill bundle provides a standard cryptocurrency price monitoring tool using the public CoinGecko API. The Python script (crypto_alert.py) and documentation (SKILL.md) perform legitimate functions such as fetching price data, comparing it against user-defined thresholds, and optionally sending alerts via Telegram using user-provided credentials. No evidence of malicious intent, data exfiltration, or prompt injection was found.
Capability Assessment
Purpose & Capability
The name/description (monitor crypto prices, trigger alerts, optional Telegram delivery) matches the included instructions and Python script: it polls CoinGecko, compares thresholds, prints alerts, and can POST to Telegram. No unrelated credentials or platform access are requested.
Instruction Scope
Instructions and code stay within the stated purpose (fetch prices from CoinGecko, evaluate alerts, deliver to console/Telegram). Minor inconsistency: the SKILL.md's embedded script writes triggered alerts to /tmp/crypto_alerts_triggered.json, whereas the included crypto_alert.py file in the manifest (the delivered code) does not include that /tmp write — verify which version you run. Both versions only reference local config and make outbound network calls to CoinGecko and Telegram.
Install Mechanism
No install spec (instruction-only + included script) — lowest install risk. The script requires the Python 'requests' library but the skill does not declare dependencies; user must ensure Python+requests are available.
Credentials
No required environment variables or unrelated credentials are requested. Telegram bot token and chat ID are optional fields in the local JSON config (expected and proportionate). The skill does not request additional secrets or system credentials.
Persistence & Privilege
Skill is not always-enabled and does not request elevated or persistent platform privileges. It runs as a local script and (per SKILL.md) may be scheduled via cron — expected for this use case.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install crypto-price-monitor
  3. After installation, invoke the skill by name or use /crypto-price-monitor
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release - Monitor crypto prices via CoinGecko API, trigger alerts with Telegram support
Metadata
Slug crypto-price-monitor
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Crypto Price Monitor?

Monitor cryptocurrency prices and trigger alerts when thresholds are hit. Supports BTC, ETH, SOL, and 100+ other coins via CoinGecko API. Configure price cei... It is an AI Agent Skill for Claude Code / OpenClaw, with 158 downloads so far.

How do I install Crypto Price Monitor?

Run "/install crypto-price-monitor" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Crypto Price Monitor free?

Yes, Crypto Price Monitor is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Crypto Price Monitor support?

Crypto Price Monitor is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Crypto Price Monitor?

It is built and maintained by yongtaop1-sys (@yongtaop1-sys); the current version is v1.0.0.

💬 Comments