crypto-price-monitor
Real-time cryptocurrency price monitoring with intelligent alerts via CoinGecko API
Quick Start
Template Contents
Browse files before installing this template.
About
Crypto Price Monitor
Real-time cryptocurrency price tracking with intelligent alerts
A proactive OpenClaw agent that monitors cryptocurrency prices using CoinGecko's API and sends smart alerts when significant price movements occur. Perfect for traders, investors, and crypto enthusiasts who want to stay informed without constantly checking prices.
π― What It Does
- Continuous monitoring β Checks prices every 5 minutes via scheduled heartbeat
- Smart alerts β Only notifies on significant moves (configurable thresholds)
- Multi-coin tracking β Monitor Bitcoin, Ethereum, and custom watchlists
- Historical context β Shows 24h change, volume, and market cap
- Rate-limit aware β Respects CoinGecko's free tier limits (50 req/min)
- Beautiful formatting β Clean, emoji-rich price alerts
β¨ Key Features
Proactive Heartbeat Monitoring
The agent wakes up every 5 minutes, checks your watchlist, and alerts you only when:
- Price moves >5% in 5 minutes (significant movement)
- Price crosses custom thresholds you've set
- Major market events detected (>20% moves)
When nothing noteworthy happens, it stays silent with HEARTBEAT_OK.
Intelligent Alert Levels
- π¨ URGENT β >20% price change (major event)
- β οΈ IMPORTANT β 10-20% price change
- π‘ INTERESTING β 5-10% price change
- β HEARTBEAT_OK β No significant movement
On-Demand Price Checks
Ask the agent anytime:
- "What's the price of Bitcoin?"
- "Show me ETH stats"
- "Check my watchlist"
- "Add Solana to my watchlist"
π Prerequisites
- OpenClaw v0.20.0 or later
- CoinGecko API (free tier works great β no key required for basic usage)
- Telegram/Discord/Signal account for receiving alerts
π Quick Start
1. Install the template
hatchery run @openclaw/crypto-price-monitor
2. Configure your watchlist
Edit the initial watchlist in memory/watchlist.json or just tell the agent:
Add Solana and Cardano to my watchlist
3. Set alert thresholds (optional)
Alert me when Bitcoin moves more than 3% in 5 minutes
The agent will remember your preferences in MEMORY.md.
4. Sit back and receive alerts
The agent monitors continuously and alerts you only when something significant happens.
π§ Configuration
Environment Variables
No API keys required for basic usage! CoinGecko's free tier is accessed without authentication.
Optional:
# For higher rate limits (300 req/min)
COINGECKO_API_KEY=your_pro_api_key_here
# Set your timezone for time-aware alerts
USER_TIMEZONE=America/New_York
Watchlist Management
Your watchlist is stored in memory/watchlist.json:
{
"coins": [
{
"id": "bitcoin",
"symbol": "BTC",
"alertThreshold": 5.0
},
{
"id": "ethereum",
"symbol": "ETH",
"alertThreshold": 5.0
}
]
}
You can edit this file directly or just talk to the agent naturally.
Heartbeat Schedule
By default, checks every 5 minutes. To adjust, modify the OpenClaw heartbeat configuration:
{
"heartbeat": {
"enabled": true,
"interval": "*/5 * * * *" // cron format: every 5 minutes
}
}
π¬ Example Conversations
Adding Coins to Your Watchlist
You: Add Solana and Polkadot to my watchlist
Agent: β
Added to your watchlist:
β’ Solana (SOL) β $98.45
β’ Polkadot (DOT) β $7.23
I'll monitor these for significant price movements.
On-Demand Price Check
You: What's Bitcoin doing?
Agent: βΏ Bitcoin (BTC)
π° $52,340.50
π 24h: +2.34% | Vol: $28.4B
π Market Cap: #1 ($1.03T)
Proactive Alert (Heartbeat)
Agent: π¨ SIGNIFICANT PRICE MOVEMENT
βΏ Bitcoin (BTC)
π° $54,123.00 (+3.4% in 5 min)
π 24h: +5.67%
This crossed your 3% alert threshold.
ποΈ Architecture
File Structure
workspace/
βββ README.md # This file
βββ hatchery.yaml # Runtime config (Claude Sonnet, heartbeat enabled)
βββ SOUL.md # Agent personality (analytical, calm)
βββ AGENTS.md # Behavioral instructions
βββ MEMORY.md # Long-term preferences and knowledge
βββ IDENTITY.md # Quick identity card
βββ TOOLS.md # Setup and customization guide
βββ HEARTBEAT.md # Periodic monitoring checklist
βββ skills/
β βββ coingecko/
β βββ SKILL.md # CoinGecko API instructions
β βββ fetch-price.sh # Price fetching script
βββ memory/
βββ watchlist.json # Your tracked coins
βββ heartbeat-state.json # Last check timestamps and values
How It Works
- Heartbeat trigger β OpenClaw calls the agent every 5 minutes
- Load state β Agent reads
heartbeat-state.jsonfor last known prices - Fetch prices β Calls CoinGecko API via
skills/coingecko/fetch-price.sh - Compare & decide β Calculates % change, checks thresholds
- Alert or silence β Sends alert if significant, otherwise
HEARTBEAT_OK - Update state β Writes new prices to
heartbeat-state.json
π‘οΈ Security & Privacy
- Main session only β This agent is designed for personal use (operator only)
- No DM/group sessions β Prevents unauthorized users from modifying your watchlist
- API key protection β Never logs credentials to memory or transcripts
- Read-only by default β Uses CoinGecko's public API (no trading capabilities)
π Rate Limits & Performance
CoinGecko Free Tier
- 50 requests/minute β More than enough for typical watchlists
- With 10 coins checked every 5 minutes β 2 req/min average
- No API key required for basic usage
CoinGecko Pro Tier (optional)
- 300 requests/minute β For large watchlists or more frequent checks
- Set
COINGECKO_API_KEYenvironment variable
Resource Usage
- CPU: Minimal (curl + jq scripts)
- Memory: ~50MB (agent overhead)
- Network: ~10KB per price check
π¨ Customization Ideas
Adjust Alert Sensitivity
Edit HEARTBEAT.md to change thresholds:
- If price moved >3% (was 5%): IMPORTANT alert
- If price moved >15% (was 20%): URGENT alert
Add More Coins
CoinGecko supports 10,000+ coins. Find IDs at: https://api.coingecko.com/api/v3/coins/list
Multi-Timeframe Analysis
Modify skills/coingecko/fetch-price.sh to include 1h, 7d, 30d changes.
Export Price History
Add a skill to write daily price snapshots to memory/price-history/YYYY-MM-DD.json.
π Troubleshooting
Agent isn't sending alerts
- Check heartbeat is enabled in OpenClaw config
- Verify watchlist.json has valid coin IDs
- Ensure prices are actually moving enough to cross thresholds
- Check logs:
docker logs openclaw
"Rate limit exceeded" errors
- You're checking too many coins too frequently
- Add a Pro API key, or reduce check frequency to every 10 minutes
Coin not found
- Verify the coin ID at https://api.coingecko.com/api/v3/coins/list
- Use the exact
idfield (not symbol) - Example: Use "bitcoin" not "BTC"
π Learn More
π License
MIT License - Free to use and modify
π€ Contributing
Found a bug or have an enhancement? Open an issue or PR on the Hatchery registry.
Built with OpenClaw β Self-hosted AI agents that actually work for you.