coingecko
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCoinGecko
CoinGecko
CoinGecko provides comprehensive crypto market data including spot prices, OHLC candles, market cap, trending coins, sector performance, and global stats.
CoinGecko提供全面的加密货币市场数据,包括现货价格、OHLC蜡烛图、市值、热门币种、板块表现及全球统计数据。
When to Use CoinGecko
何时使用CoinGecko
Use CoinGecko for:
- Price queries - Current prices, historical prices, OHLC data
- Market overview - Market cap, volume, trending coins, top gainers/losers
- Coin information - Detailed coin data, tickers, trading pairs
- Exchange data - Exchange listings, volumes, trading pairs
- NFT data - NFT collections, floor prices, market stats
- Global metrics - Total market cap, dominance, DeFi stats
- Categories - Sector performance (DeFi, Gaming, Layer 1, etc.)
在以下场景使用CoinGecko:
- 价格查询 - 当前价格、历史价格、OHLC数据
- 市场概览 - 市值、交易量、热门币种、涨幅/跌幅榜
- 币种信息 - 详细币种数据、行情报价、交易对
- 交易所数据 - 交易所列表、交易量、交易对
- NFT数据 - NFT藏品、地板价、市场统计
- 全球指标 - 总市值、主导地位、DeFi统计数据
- 分类板块 - 板块表现(DeFi、游戏、Layer 1等)
Common Workflows
常见工作流程
Get Coin Price
获取币种价格
coin_price(coin_id="bitcoin") # Supports symbols like BTC, ETH, SOL
coin_price(coin_id="ethereum", vs_currencies="usd,eur")coin_price(coin_id="bitcoin") # 支持BTC、ETH、SOL等符号
coin_price(coin_id="ethereum", vs_currencies="usd,eur")Historical Data
历史数据
coin_ohlc(coin_id="bitcoin", vs_currency="usd", days=7) # OHLC candles
coin_chart(coin_id="ethereum", vs_currency="usd", days=30) # Price chart datacoin_ohlc(coin_id="bitcoin", vs_currency="usd", days=7) # OHLC蜡烛图
coin_chart(coin_id="ethereum", vs_currency="usd", days=30) # 价格图表数据Market Discovery
市场发现
cg_trending() # Trending coins in the last 24h
cg_top_gainers_losers() # Top movers
cg_new_coins() # Recently listed coins
cg_coins_markets(vs_currency="usd", order="market_cap_desc", per_page=100)cg_trending() # 过去24小时的热门币种
cg_top_gainers_losers() # 涨跌榜前列币种
cg_new_coins() # 近期上线币种
cg_coins_markets(vs_currency="usd", order="market_cap_desc", per_page=100)Coin Information
币种信息
cg_coin_data(id="bitcoin") # Detailed coin data
cg_coin_tickers(id="ethereum") # All trading pairs
cg_search(query="solana") # Search for coinscg_coin_data(id="bitcoin") # 详细币种数据
cg_coin_tickers(id="ethereum") # 所有交易对
cg_search(query="solana") # 搜索币种Exchange Data
交易所数据
cg_exchanges() # All exchanges
cg_exchange(id="binance") # Specific exchange
cg_exchange_tickers(id="binance") # Exchange trading pairs
cg_exchange_volume_chart(id="binance", days=7)cg_exchanges() # 所有交易所
cg_exchange(id="binance") # 特定交易所
cg_exchange_tickers(id="binance") # 交易所交易对
cg_exchange_volume_chart(id="binance", days=7)Global Metrics
全球指标
cg_global() # Total market stats
cg_global_defi() # DeFi specific stats
cg_categories() # Sector performancecg_global() # 整体市场统计数据
cg_global_defi() # DeFi专项统计数据
cg_categories() # 板块表现Contract Address Queries
合约地址查询
cg_token_price(contract_addresses=["0x..."], vs_currencies="usd")
cg_coin_by_contract(contract_address="0x...", platform="ethereum")cg_token_price(contract_addresses=["0x..."], vs_currencies="usd")
cg_coin_by_contract(contract_address="0x...", platform="ethereum")Important Notes
重要说明
- Coin IDs: CoinGecko uses slug IDs (e.g., "bitcoin", "ethereum", "solana"). The tools auto-resolve common symbols like BTC, ETH, SOL.
- API Key: Requires COINGECKO_API_KEY environment variable (Pro API)
- Rate Limits: Be mindful of API rate limits. Use batch endpoints when querying multiple coins.
- vs_currencies: Most endpoints support multiple currencies (usd, eur, btc, eth, etc.). Use to see all supported currencies.
cg_vs_currencies()
- 币种ID:CoinGecko使用短标识ID(如"bitcoin"、"ethereum"、"solana")。工具会自动解析BTC、ETH、SOL等常见符号。
- API密钥:需要设置COINGECKO_API_KEY环境变量(专业版API)
- 速率限制:注意API速率限制。查询多个币种时使用批量端点。
- 对比货币:大多数端点支持多种货币(usd、eur、btc、eth等)。使用查看所有支持的货币。
cg_vs_currencies()
Symbol Resolution
符号解析
Common symbols are automatically resolved:
- BTC → bitcoin
- ETH → ethereum
- SOL → solana
- USDT → tether
- USDC → usd-coin
- BNB → binancecoin
Important: If unsure about a coin ID, always use first to find the exact CoinGecko ID before calling price tools.
cg_search(query="coin name")常见符号会自动解析:
- BTC → bitcoin
- ETH → ethereum
- SOL → solana
- USDT → tether
- USDC → usd-coin
- BNB → binancecoin
重要提示:若不确定币种ID,请先使用找到准确的CoinGecko ID,再调用价格工具。
cg_search(query="币种名称")