Real-time Crypto Price API — 技能工具
v1.0.0[自动翻译] Provides real-time and historical cryptocurrency prices, market cap rankings, trending tokens, and batch queries for 10,000+ coins via API and CLI.
详细分析 ▾
运行时依赖
版本
安装命令 点击复制
技能文档
Get real-time cryptocurrency prices for 10,000+ tokens.
Installation
npm install realtime-crypto-price-api
Usage
const { CryptoPrice } = require('realtime-crypto-price-api');const client = new CryptoPrice();
// Get Bitcoin price
const btc = await client.getPrice('BTC');
console.log(Bitcoin: $${btc.price});
// Get multiple prices
const prices = await client.getPrices(['BTC', 'ETH', 'SOL']);
// Top coins by market cap
const top10 = await client.getTopCoins(10);
// Trending gainers/losers
const gainers = await client.getTrending('gainers');
// Historical OHLCV data
const history = await client.getHistory('ETH', '1d', 30);
// Search tokens
const results = await client.search('pepe');
CLI
# Single price
npx realtime-crypto-price-api BTC# Multiple prices
npx realtime-crypto-price-api batch BTC,ETH,SOL
# Top coins
npx realtime-crypto-price-api top 20
# Trending
npx realtime-crypto-price-api trending gainers
API Methods
getPrice(symbol)- Single token price with 24h changegetPrices(symbols)- Batch price querygetTopCoins(limit)- Top by market capgetTrending(direction)- Gainers or losersgetHistory(symbol, interval)- OHLCV candlessearch(query)- Find tokens
Data Source
Powered by PRISM API - aggregated from 50+ exchanges.
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制