← 返回
效率工具 中文

Crypto Prices

Fetch live cryptocurrency and commodity prices from verified sources with caching and fallback, ensuring accurate and up-to-date market data.
从可靠来源获取实时加密货币及大宗商品价格,支持缓存与回退机制,确保市场数据准确且最新。
ryandeangraves
效率工具 clawhub v1.1.0 1 版本 99842.3 Key: 无需
★ 0
Stars
📥 1,266
下载
💾 34
安装
1
版本
#latest

概述

Skill: crypto-prices

Purpose

Fetch live cryptocurrency and commodity prices using the local crypto_prices.py module. This is your single source of truth for all price data — never use web search for prices.

When to Use

  • Boss Man asks "what's BTC at?" or "price of gold" or any price query
  • You need current prices for market analysis, morning protocol, or any report
  • Anytime you're about to quote a price in conversation

How to Execute

Single Price Lookup

cd ~/clawd && python3 -c "
from crypto_prices import fetch_live_price, format_price_text
data = fetch_live_price('COIN_NAME')
if data:
    print(format_price_text(data))
    # Full details available in data dict:
    # data['price'], data['change_24h'], data['change_7d'], data['change_30d']
    # data['market_cap'], data['volume_24h'], data['high_24h'], data['low_24h']
    # data['ath'], data['ath_change_pct'], data['source']
else:
    print('Price unavailable — all providers failed')
"

Multiple Price Lookup (Batch)

cd ~/clawd && python3 -c "
from crypto_prices import fetch_multiple_prices, format_prices_block
prices = fetch_multiple_prices(['bitcoin', 'ethereum', 'xrp', 'sui', 'gold', 'silver'])
print(format_prices_block(prices))
"

Quick Price (Minimal Output)

cd ~/clawd && python3 -c "
from crypto_prices import fetch_live_price
d = fetch_live_price('COIN_NAME')
if d: print(f\"{d['symbol']}: \${d['price']:,.6g} ({d['change_24h']:+.2f}%)\")
"

Supported Assets

InputResolves ToSource
----------------------------
btc, bitcoinbitcoinCoinGecko
eth, ethereumethereumDexScreener → CoinGecko
xrp, ripplerippleDexScreener → CoinGecko
suisuiCoinGecko
sol, solanasolanaCoinGecko
gold, xaugoldYahoo Finance → CoinGecko
silver, xagsilverYahoo Finance → CoinGecko
doge, ada, dot, avax, link, maticvariousCoinGecko

Provider Chain

  1. Cache (60s TTL) — serves instantly if fresh
  2. Yahoo Finance — metals only (gold/silver), most reliable for commodities
  3. CoinGecko full — comprehensive data (price, 24h/7d/30d change, ATH/ATL, market cap)
  4. CoinGecko simple — lighter endpoint if full is rate-limited
  5. DexScreener — DEX-based failover for crypto (ETH and XRP try this first)

Rules

  • NEVER use Brave Search for prices — it returns stale article snippets, not live data
  • NEVER guess or hallucinate prices — if all providers fail, say "price unavailable"
  • Cache is 60 seconds — calling twice within a minute is free
  • Rate limits: CoinGecko ~10 req/min, DexScreener ~60 req/min
  • For batch queries, the module handles delays automatically

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-03-29 05:23 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 437 📥 147,168
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 274 📥 114,720
developer-tools

Charts

ryandeangraves
生成BTC、ETH、XRP、SUI、黄金和白银的90天K线图,包含SMA 20/50、RSI、斐波那契回撤及形态检测。
★ 0 📥 1,766