home / skills / openclaw / skills / realtime-crypto-price-api

realtime-crypto-price-api skill

/skills/strykragent/realtime-crypto-price-api

This skill provides real-time cryptocurrency prices, historical data, and batch queries to power trading dashboards and bots with 10,000+ tokens.

npx playbooks add skill openclaw/skills --skill realtime-crypto-price-api

Review the files below or copy the command above to add this skill to your agents.

Files (7)
SKILL.md
1.6 KB
---
name: realtime-crypto-price-api
description: Real-time cryptocurrency price data API for Bitcoin, Ethereum, Solana and 10,000+ tokens. Get live prices, historical data, trending coins, and batch queries for trading bots and dashboards.
---

# Real-time Crypto Price API

Get real-time cryptocurrency prices for 10,000+ tokens.

## Installation

```bash
npm install realtime-crypto-price-api
```

## Usage

```javascript
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

```bash
# 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 change
- `getPrices(symbols)` - Batch price query
- `getTopCoins(limit)` - Top by market cap
- `getTrending(direction)` - Gainers or losers
- `getHistory(symbol, interval)` - OHLCV candles
- `search(query)` - Find tokens

## Data Source

Powered by [PRISM API](https://prismapi.ai) - aggregated from 50+ exchanges.

Overview

This skill provides a real-time cryptocurrency price API covering Bitcoin, Ethereum, Solana and 10,000+ tokens. It returns live spot prices, 24h change, historical OHLCV candles, trending gainers/losers and batch queries for high-throughput clients. Use it for trading bots, portfolio dashboards, alerting systems, and market research.

How this skill works

The client aggregates price and market data from 50+ exchanges via the Prism API to deliver normalized prices and market-cap rankings. It exposes simple methods for single and batch price retrieval, top coins, trending lists, historical candle data, and token search. Responses include price, 24h percent change, and timestamped OHLCV when requesting history for charting or backtesting.

When to use it

  • Feeding live prices to automated trading bots and execution logic
  • Populating dashboards and portfolio trackers with up-to-the-second values
  • Backtesting strategies using historical OHLCV candles
  • Generating alerts for large movers via trending gainers/losers
  • Batching price requests to reduce API overhead in high-volume systems

Best practices

  • Cache batch price responses for short intervals (e.g., 5–30 seconds) to reduce rate usage while keeping freshness
  • Use getPrices for multi-symbol queries rather than many single getPrice calls
  • Fetch historical OHLCV at the same interval and timezone used by your strategy for consistent backtests
  • Validate symbols with search before requesting to avoid errors from ambiguous tickers
  • Respect rate limits of the underlying data provider and implement exponential backoff on failures

Example use cases

  • A trading bot that queries getPrices every 10 seconds and executes arbitrage across exchanges
  • A portfolio app that shows live net worth and 24h gain/loss using getPrices and getTopCoins
  • A dashboard that renders candlestick charts from getHistory for multiple timeframes
  • A monitoring service that polls getTrending('gainers') to trigger notifications for rapid rallies
  • A data-collection pipeline that archives daily OHLCV for research and model training

FAQ

Which tokens are supported?

The skill supports Bitcoin, Ethereum, Solana and over 10,000 additional tokens sourced from 50+ exchanges via the Prism API.

Can I request many symbols at once?

Yes. Use getPrices with an array of symbols to retrieve batch prices in a single call and reduce overhead.

Is historical data available for backtesting?

Yes. getHistory returns OHLCV candles for requested intervals so you can backtest and plot candlesticks.