Interactive CLI tool to fetch historical OHLCV data directly from Binance API for any cryptocurrency.
CryptoFetch is a powerful command-line tool that downloads historical cryptocurrency price data from Binance. It features a clean terminal interface with real-time progress tracking and supports all USDT trading pairs available on Binance.
- Clean Terminal Interface: Hacker-style color-coded output
- Symbol Verification: Validates trading pairs before downloading
- Multiple Timeframes: 15 intervals from 1m to 1M
- Custom Date Ranges: Flexible start/end date selection
- Real-time Progress: Live progress bars for each download
- Auto-organization: Creates folders and names files automatically
- All USDT Pairs: Supports 500+ cryptocurrencies on Binance
pip install requests tqdmpython cryptofetch.pyFollow the prompts:
- Enter cryptocurrency symbol (e.g., BTCUSDT, ETHUSDT, SOLUSDT)
- Select timeframes (e.g.,
1,4,6for 1m, 15m, 1h orallfor everything) - Enter start date (YYYY-MM-DD format)
- Enter end date (YYYY-MM-DD format)
- Specify output directory (or press Enter for default)
- Confirm and download
╔═════════════════════════════════════════════════════════════╗
║ ║
║ ██████╗██████╗ ██╗ ██╗██████╗ ████████╗ ██████╗ ║
║ ██╔════╝██╔══██╗╚██╗ ██╔╝██╔══██╗╚══██╔══╝██╔═══██╗ ║
║ ██║ ██████╔╝ ╚████╔╝ ██████╔╝ ██║ ██║ ██║ ║
║ ██║ ██╔══██╗ ╚██╔╝ ██╔═══╝ ██║ ██║ ██║ ║
║ ╚██████╗██║ ██║ ██║ ██║ ██║ ╚██████╔╝ ║
║ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ║
║ ║
║ ███████╗███████╗████████╗ ██████╗██╗ ██╗ ║
║ ██╔════╝██╔════╝╚══██╔══╝██╔════╝██║ ██║ ║
║ █████╗ █████╗ ██║ ██║ ███████║ ║
║ ██╔══╝ ██╔══╝ ██║ ██║ ██╔══██║ ║
║ ██║ ███████╗ ██║ ╚██████╗██║ ██║ ║
║ ╚═╝ ╚══════╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ║
║ ║
║ Historical Crypto Data Downloader ║
║ ║
║ [+] Made by: Varshith Karkera ║
║ [>] github.com/varshithkarkera ║
║ ║
╚═════════════════════════════════════════════════════════════╝
[>] Enter cryptocurrency symbol (e.g., BTCUSDT, ETHUSDT, SOLUSDT):
>>> SOLUSDT
[>] Available intervals:
1. 1m
2. 3m
3. 5m
4. 15m
5. 30m
6. 1h
7. 2h
8. 4h
9. 6h
10. 8h
11. 12h
12. 1d
13. 3d
14. 1w
15. 1M
[>] Select intervals (comma-separated, e.g., 1,4,6 or 'all'):
>>> 1,4,6
[>] Start date (YYYY-MM-DD):
>>> 2020-09-01
[>] End date (YYYY-MM-DD):
>>> 2026-01-03
[>] Output directory (default: sol/):
>>>
=================================================================
[+] DOWNLOAD SUMMARY
=================================================================
Symbol: SOLUSDT
Intervals: 1m, 15m, 1h
Date Range: 2020-09-01 to 2026-01-03
Output: sol/
=================================================================
[?] Start download? (y/n):
>>> y
[+] Starting download...
[*] Fetching SOLUSDT 1m from 2020-09-01 to 2026-01-03
SOLUSDT 1m |████████████████████| 100.0%
[+] Saved 2,828,160 candles to sol/solusdt_1m.csv
...
CryptoFetch supports all USDT trading pairs available on Binance, including:
- Bitcoin (BTCUSDT)
- Ethereum (ETHUSDT)
- Solana (SOLUSDT)
- BNB (BNBUSDT)
- XRP (XRPUSDT)
- Cardano (ADAUSDT)
- Dogecoin (DOGEUSDT)
- Polygon (MATICUSDT)
- And 500+ more...
1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M
Each CSV file contains the following columns:
| Column | Description |
|---|---|
open_time_ms |
Candle open time in milliseconds (Unix timestamp) |
open |
Opening price |
high |
Highest price during the period |
low |
Lowest price during the period |
close |
Closing price |
volume |
Trading volume (base asset) |
close_time_ms |
Candle close time in milliseconds (Unix timestamp) |
quote_asset_volume |
Trading volume (quote asset, e.g., USDT) |
number_of_trades |
Number of trades during the period |
taker_buy_base_asset_volume |
Taker buy volume (base asset) |
taker_buy_quote_asset_volume |
Taker buy volume (quote asset) |
ignore |
Unused field (always 0) |
For Bitcoin historical data (2018-2024), check out this comprehensive Kaggle dataset:
- Source: Kaggle - Bitcoin Historical Datasets
- Timeframes: 15m, 1h, 4h, 1d
- Updated: Daily
This dataset is provided as-is under the MIT License. The data is sourced from Binance's public API.
Made by Varshith Karkera