npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

claw-crypto-monitor

v1.0.0

Published

Real-time cryptocurrency price monitoring and alert system with multi-exchange support and Redis caching

Readme

Claw Crypto Monitor

A professional real-time cryptocurrency price monitoring system with multi-exchange support, Redis caching, and alert capabilities.

Features

  • Real-time price monitoring from multiple exchanges
  • Redis caching for high-performance data storage
  • WebSocket support for live updates
  • Price alerts with customizable thresholds
  • Multi-exchange support (Coinbase, Binance, etc.)
  • TypeScript for type safety
  • Express.js web server for API endpoints
  • Winston logging for production monitoring

Installation

npm install claw-crypto-monitor

Quick Start

const { cryptoMonitor } = require('claw-crypto-monitor');

// Get the monitor instance (singleton)
console.log('Crypto Monitor initialized:', cryptoMonitor.constructor.name);

// Start monitoring
cryptoMonitor.start();

// The monitor will automatically:
// 1. Fetch prices from configured exchanges
// 2. Cache results in Redis (if configured)
// 3. Provide real-time updates via WebSocket

// Get current prices
async function checkPrices() {
  try {
    // This would fetch current prices
    console.log('Monitoring cryptocurrency prices...');
    // In a real application, you would subscribe to events or call methods
  } catch (error) {
    console.error('Error:', error.message);
  }
}

// Check prices periodically
setInterval(checkPrices, 30000); // Every 30 seconds
checkPrices(); // Initial check

API Documentation

CryptoMonitor Class

Constructor Options

interface MonitorOptions {
  redisUrl?: string;      // Redis connection URL
  exchanges?: string[];   // List of exchanges to monitor
  symbols?: string[];     // Trading pairs to track
  updateInterval?: number;// Price update interval in seconds (default: 30)
  cacheTTL?: number;      // Redis cache TTL in seconds (default: 300)
}

Methods

  • start(): Promise<void> - Start the monitoring service
  • stop(): Promise<void> - Stop the monitoring service
  • getPrice(symbol: string): Promise<number> - Get current price for a symbol
  • getPrices(): Promise<Record<string, number>> - Get all current prices
  • setAlert(symbol: string, config: AlertConfig): void - Set price alert
  • removeAlert(symbol: string): void - Remove price alert

Events

  • priceUpdate - Fired when a price updates
  • alertTriggered - Fired when an alert threshold is crossed
  • error - Fired on errors

Advanced Usage

Web Server Integration

const express = require('express');
const { CryptoMonitor } = require('claw-crypto-monitor');

const app = express();
const monitor = new CryptoMonitor();

// API endpoint to get current prices
app.get('/api/prices', async (req, res) => {
  const prices = await monitor.getPrices();
  res.json(prices);
});

// Start server and monitor
monitor.start();
app.listen(3000, () => {
  console.log('Server running on port 3000');
});

Redis Configuration

The monitor uses Redis for caching. Make sure Redis is running:

# Install Redis
sudo apt-get install redis-server

# Start Redis
sudo systemctl start redis

Development

# Clone the repository
git clone <repository-url>

# Install dependencies
npm install

# Build TypeScript
npm run build

# Run tests
npm test

# Start development server
npm run dev

License

MIT © Claw Digital Familiar