| name | coingecko |
| description | CoinGecko crypto market data — top coins by market cap, trending, global stats, exchange volumes. Free, no API key. |
| category | data-source |
CoinGecko
Overview
CoinGecko provides free cryptocurrency market data including market cap rankings, trending coins, global market statistics, and exchange volumes. No registration or API key required for basic usage.
Note: CoinGecko does NOT provide OHLCV klines. For crypto OHLCV, use the okx or ccxt loaders. CoinGecko complements these with market-wide data (rankings, market cap, dominance).
The loader is at backtest/loaders/coingecko.py.
Rate Limits
- Free tier: ~10-30 requests per minute
- No API key: shared rate limit across all users
- Consider adding a CoinGecko API key for higher limits
Available Data
1. Top Coins by Market Cap
from backtest.loaders.coingecko import DataLoader
loader = DataLoader()
top50 = loader.fetch_top_coins(limit=50)
2. Trending Coins
trending = loader.fetch_trending()
3. Global Market Stats
global_stats = loader.fetch_global_stats()
4. Exchange Volumes
exchanges = loader.fetch_exchanges(limit=20)
Integration with Other Crypto Sources
| Use Case | Best Source |
|---|
| OHLCV K-lines | okx / ccxt |
| Real-time ticker | okx |
| Market cap rankings | coingecko |
| Trending / hot coins | coingecko |
| Global market overview | coingecko |
| Exchange comparison | coingecko |