mcpbeat Sign in

Get Crypto Price Agent Skill

Fetch current and historical crypto prices and compute ATH or ATL over common time windows.

2k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
127
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/besoeasy/open-skills --skill get-crypto-price

The instruction itself

8 sections, as written by the author

Get Crypto Price (minimal guide)

This short guide shows how to fetch current prices and at least 3 months of past price action using CoinGecko, Binance, and Coinbase public APIs. It also shows how to compute ATH (highest) and ATL (lowest) within time windows: 1 DAY, 1 WEEK, 1 MONTH.


Quick notes

  • Timestamps: many APIs return milliseconds since epoch (ms) or seconds (s). Convert consistently.
  • Rate limits: respect exchange rate limits; cache responses when possible.
  • Symbols: use canonical pair symbols (e.g., BTCUSDT on Binance, bitcoin on CoinGecko).

  • Current price (curl):
curl "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd"
  • Last 90 days (price history):
curl "https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=90"

Response contains prices array: [[timestamp_ms, price], ...].

Node.js: Fetch 90 days and compute ATH/ATL for 1d/7d/30d windows.

async function fetchCoinGeckoPrices(coinId = 'bitcoin', vs = 'usd', days = 90) {
  const url = `https://api.coingecko.com/api/v3/coins/${coinId}/market_chart`;
  const res = await fetch(`${url}?vs_currency=${vs}&days=${days}`);
  if (!res.ok) throw new Error(`HTTP ${res.status}`);
  const data = await res.json();
  return data.prices; // array of [ts_ms, price]
}

function maxMinInWindow(prices, sinceMs) {
  const window = prices.filter(([ts]) => ts >= sinceMs).map(([, p]) => p);
  if (window.length === 0) return [null, null];
  return [Math.max(...window), Math.min(...window)];
}

const prices = await fetchCoinGeckoPrices('bitcoin', 'usd', 90);
const nowMs = Date.now();

const windows = {
  '1d': nowMs - 24 * 3600 * 1000,
  '1w': nowMs - 7 * 24 * 3600 * 1000,
  '1m': nowMs - 30 * 24 * 3600 * 1000,
};

for (const [name, since] of Object.entries(windows)) {
  const [ath, atl] = maxMinInWindow(prices, since);
  console.log(name, 'ATH:', ath, 'ATL:', atl);
}

Notes: CoinGecko returns sampled points (usually hourly) — good for these windows.


2) Binance (exchange-level data)

  • Current price (curl):
curl "https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT"
  • Historical klines (candles): use klines endpoint. Example: fetch daily candles for the last 1000 days or hourly for finer resolution.
# daily candles for BTCUSDT (limit up to 1000 rows)
curl "https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=1d&limit=1000"

Each kline row: [openTime, open, high, low, close, ...] where openTime is ms.

Node.js: Fetch hourly klines for last 90 days and compute ATH/ATL windows.

async function fetchBinanceKlines(symbol = 'BTCUSDT', interval = '1h', limit = 1000) {
  const url = 'https://api.binance.com/api/v3/klines';
  const params = new URLSearchParams({ symbol, interval, limit: String(limit) });
  const res = await fetch(`${url}?${params}`);
  if (!res.ok) throw new Error(`HTTP ${res.status}`);
  return await res.json(); // array of arrays
}

// To cover ~90 days hourly: 24*90 = 2160 rows -> call twice with different startTimes or use 4h interval
const klines = await fetchBinanceKlines('BTCUSDT', '1h', 1000);
// For more than 1000 rows you'd loop with startTime using ms timestamps.

// Convert to list of [ts_ms, high, low]
const data = klines.map(row => [row[0], parseFloat(row[2]), parseFloat(row[3])]);
const nowMs = Date.now();

function athAtlFromKlines(data, sinceMs) {
  const filtered = data.filter(([ts]) => ts >= sinceMs);
  if (filtered.length === 0) return [null, null];
  const highs = filtered.map(([, h]) => h);
  const lows = filtered.map(([, , l]) => l);
  return [Math.max(...highs), Math.min(...lows)];
}

const windows = {
  '1d': nowMs - 24 * 3600 * 1000,
  '1w': nowMs - 7 * 24 * 3600 * 1000,
  '1m': nowMs - 30 * 24 * 3600 * 1000,
};

for (const [name, since] of Object.entries(windows)) {
  const [ath, atl] = athAtlFromKlines(data, since);
  console.log(name, 'ATH:', ath, 'ATL:', atl);
}

Notes: Binance limit is 1000 max per request; for full 90 days hourly, page by startTime.


3) Coinbase (public example)

  • Current spot price (curl):
curl "https://api.coinbase.com/v2/prices/BTC-USD/spot"
  • Historical candles (Coinbase Exchange API):
curl "https://api.exchange.coinbase.com/products/BTC-USD/candles?granularity=3600&start=2025-11-01T00:00:00Z&end=2026-02-01T00:00:00Z"

Response: array of [time, low, high, open, close, volume]. Use similar filtering by timestamp to compute ATH/ATL.


4) Compute ATH / ATL for a timeframe (1 DAY, 1 WEEK, 1 MONTH)

General steps (applies to any data source that gives timestamped prices or OHLC candles):

  • Fetch historical points that cover at least the desired window (e.g., last 90 days).
  • Choose the window start timestamp (now - window_seconds).
  • Filter the points where timestamp >= window_start.
  • If you have OHLC candles, use high as candidate for ATH and low as candidate for ATL. If you only have sampled prices, use max/min of sampled values.

Example with simple price points (Node.js):

// points = [[ts_ms, price], ...]
const sinceMs = Date.now() - 24 * 3600 * 1000; // 1 day
const windowPrices = points.filter(([ts]) => ts >= sinceMs).map(([, p]) => p);
if (windowPrices.length > 0) {
  const ath = Math.max(...windowPrices);
  const atl = Math.min(...windowPrices);
} else {
  const ath = null;
  const atl = null;
}

If using OHLC candles:

// candles = [[ts_ms, open, high, low, close], ...]
const window = candles.filter(c => c[0] >= sinceMs);
const ath = Math.max(...window.map(c => c[2]));
const atl = Math.min(...window.map(c => c[3]));

5) Practical tips

  • For 3 months of past price action, fetch 90 days of data or page the exchange candle endpoints until you cover ~90 days.
  • Use hourly or daily granularity depending on required resolution. For 1-day ATH/ATL, hourly or minute granularity is better.
  • Convert times into UTC and use ms for consistency.
  • Respect API rate limits and use caching for repeated queries.

6) Example workflow (summary)

  • Try CoinGecko market_chart?days=90 for quick 90-day history.
  • Compute windows for 1d/7d/30d from that array and derive ATH/ATL.
  • For exchange-precise data or higher resolution, query Binance klines or Coinbase candles and repeat the same aggregation.

If you want, I can add ready-to-run scripts for specific coins (BTC, ETH) and automate paginated Binance fetches to guarantee 90 days of hourly data.

Agent note: When producing human-friendly reports, agents should use the skills/user-ask-for-report skill to produce formatted outputs and hosted report pages. See skills/user-ask-for-report/SKILL.md for examples and templates.

Example agent prompt:

> Use the user-ask-for-report skill to create a short Bitcoin price report (current price, 24h change, 7d change) in a clean hosted report page. Include source URLs.

Other skills for the same job

different authors, same section of the catalogue
Invoice Organizer
by frostant
×5

Automatically organizes invoices and receipts for tax preparation by reading messy files, extracting key information, renaming them consistently, and sorting them into logical folders. Turns hours of manual bookkeeping into minutes of automated organization.

3k tokens
Backtest Expert
by BaggaT236
×3

Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development.

15k tokens scripts
Analyzing Financial Statements
by anthropics
vendor ×2

This skill calculates key financial ratios and metrics from financial statement data for investment analysis

8k tokens scripts
Creating Financial Models
by anthropics
vendor ×2

This skill provides an advanced financial modeling suite with DCF analysis, sensitivity testing, Monte Carlo simulations, and scenario planning for investment decisions

8k tokens scripts
Earnings Calendar
by nicepkg
×2

This skill retrieves upcoming earnings announcements for US stocks using the Financial Modeling Prep (FMP) API. Use this when the user requests earnings calendar data, wants to know which companies are reporting earnings in the upcoming week, or needs a weekly earnings review. The skill focuses on mid-cap and above companies (over $2B market cap) that have significant market impact, organizing the data by date and timing in a clean markdown table format. Supports multiple environments (CLI, Desktop, Web) with flexible API key management.

17k tokens scripts
Agentic Wallet
by coinbase
vendor ×2

Crypto wallet operations via the awal CLI — sign in, check balances, send USDC/ETH/POL/SOL, trade tokens, fund the wallet, and use the x402 payment protocol to discover paid services, pay for API calls, monetize an API, or query onchain data. Use whenever the user mentions signing in, login, authentication, wallet status, balance, address, sending money, paying someone, transferring tokens, ENS names, swapping/trading/converting tokens, funding/topping up/onramp, USDC, ETH, POL, SOL, the x402 bazaar, paid APIs, monetizing an endpoint, or querying onchain data on Base.

14k tokens
Alpha Vantage
by christophacham
×2

Access real-time and historical stock market data, forex rates, cryptocurrency prices, commodities, economic indicators, and 50+ technical indicators via the Alpha Vantage API. Use when fetching stock prices (OHLCV), company fundamentals (income statement, balance sheet, cash flow), earnings, options data, market news/sentiment, insider transactions, GDP, CPI, treasury yields, gold/silver/oil prices, Bitcoin/crypto prices, forex exchange rates, or calculating technical indicators (SMA, EMA, MACD, RSI, Bollinger Bands). Requires a free API key from alphavantage.co.

13k tokens
Braintree Automation
by christophacham
×2

Braintree Automation: manage payment processing via Stripe-compatible tools for customers, subscriptions, payment methods, and transactions

2k tokens needs MCP

How to use it

Copy the folder

Take besoeasy/get-crypto-price from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.