BACK TO CLAUDE SKILLS
◈
fetch_ohlcv_coingecko
Data PipelineDataCoinGecko
INSTALLATION
$python -c "exec(open('fetch_ohlcv_coingecko.py').read())"
#or paste directly into your Claude Code terminal
[ ABOUT ]
Fetches OHLCV candle data from the CoinGecko public API v3 for any coin by its CoinGecko ID (e.g. `bitcoin`, `ethereum`, `solana`). The response contains [timestamp, open, high, low, close] arrays which the function unpacks into a clean dictionary keyed by OHLCV field name.
The CoinGecko free API allows up to 365 days of daily OHLCV data without authentication. Rate limits apply — if scanning more than 50 coins in rapid succession, add a `time.sleep(1)` between calls or use the paid API tier with higher rate limits. The candle data matches TradingView's daily bars when using the same exchange as the data source.
[ USAGE EXAMPLE ]
[ FULL CODE ]
[ METADATA ]
CategoryData Pipeline
ComplexityIntermediate
LanguagePython 3.10+
TagsData, CoinGecko
[ ASK CLAUDE ]
Ask AI about this skill before installing it.