Command Palette

Search for a command to run...

Назад к скиллам
скилл № 99217

crypto-market-data-service-guide

Guide to the Crypto Market Data TypeScript service — clean market data APIs for token prices, candles, market cap, and volume across multiple chains. Features…

БесплатноБез исполняемых скриптов
nirholasот nirholas★ 289 звёзд на GitHub

Установить crypto-market-data-service-guide в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Crypto Market Data Service Guide

A production-ready TypeScript service for crypto market data. Features caching, rate limiting, fallback sources, and WebSocket subscriptions.

Architecture

Client Request
    │
    ▼
Rate Limiter → Cache Check
    │              │
    │          Cache Hit? → Return cached
    │              │
    │          Cache Miss
    │              │
    ▼              ▼
Primary Source (CoinGecko)
    │
    ├── Success → Cache → Return
    │
    └── Failure → Fallback Source
                    │
                    ├── CoinMarketCap
                    ├── DeFi Llama
                    └── DexScreener

Quick Start

import { MarketDataService } from '@nirholas/crypto-market-data';

const service = new MarketDataService({
  primarySource: 'coingecko',
  fallbackSources: ['coinmarketcap', 'defillama'],
  cache: { ttl: 60_000 },  // 1 minute cache
  rateLimit: { maxRequests: 30, windowMs: 60_000 }
});

Price Data

// Get current price
const price = await service.getPrice('SPA', 'usd');
// { price: 0.0123, change24h: 5.2, volume24h: 1234567 }

// Get multiple prices
const prices = await service.getPrices(['SPA', 'ETH', 'BTC'], 'usd');

// Get price with metadata
const detailed = await service.getDetailedPrice('SPA');
// { price, marketCap, volume24h, circulatingSupply, ath, athDate, ... }

Candle Data (OHLCV)

// Get 1-hour candles
const candles = await service.getCandles('SPA', {
  interval: '1h',
  limit: 100
});
// [{ time, open, high, low, close, volume }, ...]

// Get daily candles with date range
const daily = await service.getCandles('SPA', {
  interval: '1d',
  from: '2024-01-01',
  to: '2024-12-31'
});

WebSocket Subscriptions

// Subscribe to real-time price updates
service.subscribePrices(['SPA', 'ETH'], (update) => {
  console.log(`${update.symbol}: $${update.price}`);
});

// Subscribe to trade events
service.subscribeTrades('SPA', (trade) => {
  console.log(`${trade.side} ${trade.amount} @ ${trade.price}`);
});

Caching

const service = new MarketDataService({
  cache: {
    ttl: 60_000,          // Default: 1 minute
    maxSize: 10_000,      // Max cached entries
    strategy: 'lru',      // LRU eviction
    persistence: 'redis', // Optional: Redis backend
    redisUrl: process.env.REDIS_URL
  }
});

Rate Limiting

const service = new MarketDataService({
  rateLimit: {
    maxRequests: 30,
    windowMs: 60_000,
    strategy: 'sliding-window',
    queueExcess: true  // Queue instead of reject
  }
});

Fallback Chain

const service = new MarketDataService({
  primarySource: 'coingecko',
  fallbackSources: ['coinmarketcap', 'defillama', 'dexscreener'],
  fallbackStrategy: 'sequential',  // Try each in order
  // OR
  fallbackStrategy: 'race',  // Use fastest response
});

Token Lists

// Search tokens
const results = await service.searchTokens('sperax');
// [{ symbol: 'SPA', name: 'Sperax', chain: 'arbitrum', address: '0x...' }]

// Get trending tokens
const trending = await service.getTrending();

// Get token by address
const token = await service.getTokenByAddress('0x...', 'arbitrum');

SperaxOS Integration

This service powers the market data layer in SperaxOS:

  • Portfolio value calculations
  • Price charts in chat
  • CoinGecko tool backend
  • Price alerts engine

Links

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл crypto-market-data-service-guide?

Guide to the Crypto Market Data TypeScript service — clean market data APIs for token prices, candles, market cap, and volume across multiple chains. Features caching, rate limiting, fallback sources, and WebSocket subscriptions. Built for production DeFi applications.

Как установить скилл crypto-market-data-service-guide?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл crypto-market-data-service-guide запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить crypto-market-data-service-guide с