home / skills / openclaw / skills / crypto-tracker

crypto-tracker skill

/skills/dbhurley/crypto-tracker

This skill helps you track cryptocurrency prices, set alerts, and search coins via CoinGecko without an API key.

npx playbooks add skill openclaw/skills --skill crypto-tracker

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
2.7 KB
---
name: crypto-tracker
description: Track crypto prices, set alerts, and search coins via CoinGecko API.
homepage: https://www.coingecko.com/api
metadata: {"clawdis":{"emoji":"📈","requires":{"bins":["uv"]}}}
---

# Crypto Tracker

Track cryptocurrency prices, set price/percentage alerts, and search coins using the free CoinGecko API (no API key required).

## Quick Commands

### Check Prices
```bash
# Single coin
uv run {baseDir}/scripts/crypto.py price bitcoin

# Multiple coins
uv run {baseDir}/scripts/crypto.py price bitcoin ethereum solana

# With more details (market cap, volume)
uv run {baseDir}/scripts/crypto.py price bitcoin --detailed
```

### Search Coins
```bash
# Find coin ID by name/symbol
uv run {baseDir}/scripts/crypto.py search doge
uv run {baseDir}/scripts/crypto.py search cardano
```

### Manage Alerts

```bash
# Set price threshold alert
uv run {baseDir}/scripts/crypto.py alert <user_id> bitcoin above 100000
uv run {baseDir}/scripts/crypto.py alert <user_id> ethereum below 3000

# Set percentage change alert (24h)
uv run {baseDir}/scripts/crypto.py alert <user_id> bitcoin change 5    # ±5%
uv run {baseDir}/scripts/crypto.py alert <user_id> solana drop 10      # -10%
uv run {baseDir}/scripts/crypto.py alert <user_id> ethereum rise 15    # +15%

# List user's alerts
uv run {baseDir}/scripts/crypto.py alerts <user_id>

# Remove an alert
uv run {baseDir}/scripts/crypto.py alert-rm <alert_id>

# Check all alerts (for cron/heartbeat)
uv run {baseDir}/scripts/crypto.py check-alerts
```

## Coin Aliases

Common symbols are automatically resolved:
- `btc` → bitcoin
- `eth` → ethereum  
- `sol` → solana
- `doge` → dogecoin
- `ada` → cardano
- `xrp` → ripple
- `dot` → polkadot
- `matic` → polygon
- `link` → chainlink
- `avax` → avalanche-2
- `ltc` → litecoin

## Alert Types

| Type | Example | Triggers When |
|------|---------|---------------|
| `above` | `alert user btc above 100000` | Price >= $100,000 |
| `below` | `alert user eth below 3000` | Price <= $3,000 |
| `change` | `alert user btc change 5` | 24h change >= ±5% |
| `drop` | `alert user sol drop 10` | 24h change <= -10% |
| `rise` | `alert user eth rise 15` | 24h change >= +15% |

## Cron Integration

Check alerts periodically (e.g., every 15 minutes):
```bash
uv run {baseDir}/scripts/crypto.py check-alerts --json-output
```

Returns triggered alerts with user IDs for notification.

## Data Storage

Alerts stored in `{baseDir}/data/alerts.json` with:
- Per-user alert tracking
- Cooldown between repeat notifications (default: 1 hour)
- Last triggered timestamp

## Notes

- CoinGecko free tier: ~10-30 requests/minute (no API key needed)
- 15,000+ coins supported
- Use `--json-output` flag for machine-readable output

Overview

This skill tracks cryptocurrency prices, sets price and percentage-change alerts, and searches coins using the CoinGecko API without requiring an API key. It provides CLI commands to query single or multiple assets, manage per-user alerts, and produce machine-readable output for integrations. Built-in coin aliases simplify common symbols and alerts persist to a local JSON store.

How this skill works

The skill queries CoinGecko for current price, market cap, volume, and 24h change when requested. Alerts are defined per user and saved to a local alerts.json file; a check-alerts command evaluates triggers and returns any matches for notification. Cron-friendly JSON output and cooldown handling prevent repeat notifications within the configured window.

When to use it

  • Get up-to-the-minute prices for one or many coins from CoinGecko
  • Set automated alerts for price thresholds or percentage moves (rise/drop/change)
  • Search for a coin ID by name or symbol before using commands
  • Run periodic checks via cron to notify users about triggered alerts
  • Integrate outputs into bots or monitoring systems using --json-output

Best practices

  • Respect CoinGecko rate limits (approx 10–30 requests/minute for free tier) and batch queries where possible
  • Use coin search or aliases before creating alerts to ensure correct coin ID
  • Run check-alerts on a short cron interval (e.g., 5–15 minutes) to balance timeliness and API usage
  • Configure and monitor the alerts.json file backup to avoid data loss
  • Use --json-output for reliable machine parsing and downstream notification delivery

Example use cases

  • Query current prices for bitcoin, ethereum, and solana from the CLI
  • Create a user alert to notify when ethereum drops below $3,000 or bitcoin rises above $100,000
  • Set percentage alerts to track volatile moves like a 10% drop in SOL over 24h
  • List and remove user alerts during support or account cleanup
  • Schedule check-alerts in a cron job and forward triggered alerts to chat or email notifications

FAQ

Do I need an API key for CoinGecko?

No. The skill uses CoinGecko’s free API which does not require an API key, but you must adhere to their rate limits.

Where are alerts stored and how is duplicate notification handled?

Alerts are stored in data/alerts.json. Each alert records the last triggered timestamp and a cooldown (default one hour) to prevent repeated notifications.