/crypto-market-data-sdk:crypto-market-datafrom crypto-market-data-sdk
Fetches crypto prices, trending coins, global market stats, DeFi TVL, and Fear & Greed Index using the @nirholas/crypto-market-data library. Useful for projects needing cached, rate-limited CoinGecko and DeFiLlama data, including in Edge Runtime.
Ships in crypto-market-data-sdk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A zero-dependency client over the public CoinGecko, DeFiLlama and Fear and Greed APIs with built-in caching and rate limiting. No API key is required. Node 18 or newer (it uses global fetch), ESM and CommonJS builds.
npm install @nirholas/crypto-market-data
A default instance marketData is exported, along with one function per method (for example getTopCoins). Create your own client to change limits:
import { MarketDataClient, MarketDataError, formatPrice } from '@nirholas/crypto-market-data';
const client = new MarketDataClient({
rateLimitWindow: 60000, // ms, default 60000
maxRequestsPerWindow: 25, // default 25
timeout: 10000, // ms, default 10000
userAgent: 'my-app/1.0',
});
try {
const top = await client.getTopCoins(10);
for (const c of top) console.log(c.symbol, formatPrice(c.current_price), c.price_change_percentage_24h);
} catch (err) {
if (err instanceof MarketDataError && err.isRateLimited) {
console.log('rate limited, status', err.statusCode);
}
}
getSimplePrices() (bitcoin, ethereum, solana in USD with 24h change), getTopCoins(limit = 50), getTrending(), getCoinDetails(coinId), searchCoins(query), compareCoins(coinIds[]), getCoinsList().getHistoricalPrices(coinId, days | 'max', interval?) where interval is 'minutely' | 'hourly' | 'daily', getOHLC(coinId, days), getHistoricalPrice(coinId, date).getGlobalMarketData(), getMarketOverview(), getFearGreedIndex() (value, value_classification), getGlobalDeFiData(), getDerivativesTickers().getTopProtocols(limit = 20), getTopChains(limit = 20).getExchanges(perPage, page), getExchangeDetails(id), getCoinTickers(coinId, page), getCategories(), getCategoryCoins(categoryId, perPage, page).getCoinDeveloperData(coinId), getCoinCommunityData(coinId).clearCache(), getCacheStats(), getRateLimitStatus() returning remaining, windowResetAt, isBlocked.formatPrice, formatNumber, formatPercent, getFearGreedColor, getFearGreedBgColor.Coin IDs are CoinGecko IDs (bitcoin, solana), not ticker symbols; use searchCoins to resolve a symbol.
null on failure (getFearGreedIndex, getGlobalMarketData, getCoinDetails), so null-check them.src/index.ts in the repo; every method above is defined there.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub nirholas/crypto-market-data-ts --plugin crypto-market-data-sdkOther plugins' skills for the same job