Skip to content

openfugjoobot/crypto

Repository files navigation

💰 Crypto Skill

Complete cryptocurrency market intelligence for OpenClaw.

Version Tests License

🚀 Quick Start

# Install and start
npm install
npm run db:init
npm run scheduler:start

✨ Features

  • 📊 Real-time prices - Top 100 coins via CoinGecko API
  • 📰 News integration - 5 RSS feeds (CoinDesk, CoinTelegraph, Decrypt, CryptoSlate, AMBCrypto)
  • 🤖 Telegram bot - Commands and natural language
  • 📈 Daily briefings - AI-generated market analysis at 09:00
  • Favorites - Personal coin watchlist
  • 💾 SQLite database - Local caching and persistence
  • 🔗 URL canonicalization - Cross-feed deduplication for duplicate articles

📦 Installation

Via clawhub (recommended)

clawhub install crypto
crypto:start

Manual

git clone https://github.com/openfugjoobot/crypto.git
cd crypto
npm install
npm run db:init
npm start

⚙️ Configuration

Create .env file:

# Optional: AI endpoint for briefings
CRYPTO_AI_ENDPOINT=http://localhost:11434/api/generate
CRYPTO_AI_MODEL=llama2

# Optional: Telegram bot token
CRYPTO_TELEGRAM_BOT_TOKEN=your-bot-token

💬 Usage

Telegram Commands

  • /crypto price <coin> - Current price + 24h change
  • /crypto news [coin] - Latest news
  • /crypto favorites - Your favorites
  • /crypto briefing - Market briefing
  • /crypto help - Command list

Natural Language Examples

  • "Wie hoch ist der Bitcoin Preis?"
  • "Gibt es News zu ETH?"
  • "Wie sieht der Markt aus?"
  • "Ist Ethereum im Plus?"

CLI Commands

crypto:start     # Start scheduler
crypto:status    # Show status
crypto:stop      # Stop scheduler
crypto:briefing  # Manual briefing
crypto:test      # Run all tests

🏗️ Architecture

src/
├── api/          # CoinGecko API + News client
├── bot/          # Telegram bot commands
├── db/           # SQLite database
├── briefing/     # Daily briefing generator
└── scheduler/    # Cron scheduler

Tests: 92+ comprehensive tests
e2e: Telegram → Commands → API → DB → Response

🔧 Automated Jobs (OpenClaw Cron)

The skill uses OpenClaw's native cron system for reliable scheduling:

Job Schedule Command
crypto:prices Every 5 minutes node scripts/cron-runner.js prices
crypto:news Every 15 minutes node scripts/cron-runner.js news
crypto:briefing-v2 Daily at 09:00 CET node scripts/cron-runner.js briefing

Cron Management

# List all crypto jobs
openclaw cron list | grep crypto

# Run jobs manually
openclaw cron run crypto:prices
openclaw cron run crypto:news
openclaw cron run crypto:briefing-v2

Manual CLI Execution

cd skills/crypto

# Update prices
node scripts/cron-runner.js prices

# Fetch news
node scripts/cron-runner.js news

# Generate briefing
node scripts/cron-runner.js briefing

📊 Project Status

9/9 Issues Complete

Phase Status
Requirements
Analysis
Design
Implementation
Review
Documentation

🧪 Testing

npm test

Test Coverage:

  • Unit tests: 92+ cases
  • Integration tests: Full flows
  • Database tests: CRUD operations
  • API tests: Rate limiting, caching

📚 Documentation

🤝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing)
  3. Commit changes (git commit -m 'feat: Add amazing feature')
  4. Push to branch (git push origin feature/amazing)
  5. Open Pull Request

📄 License

MIT © OpenFugjooBot

🙏 Credits

  • Data: CoinGecko
  • News: CoinDesk, CoinTelegraph, Decrypt, CryptoSlate, AMBCrypto
  • Tests: QAAgent
  • Docs: DocsAgent
  • Orchestration: OpenFugjooBot 🎛️

About

Crypto Market Intelligence Skill for OpenClaw - Priced, News, Daily Briefing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors