Historic Crypto Python Library

·

Project Description

Historic Crypto is an open-source Python library designed for collecting historical cryptocurrency data. It interacts seamlessly with the CoinBase Pro API to provide:

Key Features:


Installation

Install via pip:

pip install Historic-Crypto

Importing Modules:

from Historic_Crypto import HistoricalData
from Historic_Crypto import Cryptocurrencies
from Historic_Crypto import LiveCryptoData

Usage

1. Cryptocurrencies Class

Purpose: Identify valid cryptocurrency tickers before querying historical/live data.

Basic Usage:

Cryptocurrencies().find_crypto_pairs()

Output:

Optional Arguments:

ArgumentDescription
coin_searchFilters results for a specific cryptocurrency (e.g., 'XLM') (str).
extended_outputExpands output with additional API fields (bool). Default: False.
verbosePrints extraction progress (bool). Default: True.

Example:

data = Cryptocurrencies(coin_search='XLM', extended_output=False).find_crypto_pairs()

2. HistoricalData Class

Purpose: Fetch historical price data.

Basic Usage:

new = HistoricalData('ETH-USD', 300, '2020-06-01-00-00').retrieve_data()

Arguments:

ArgumentDescription
tickerCryptocurrency pair (e.g., 'BTC-USD') (str).
granularityTime interval in seconds (60, 300, 900, 3600, etc.) (int).
start_dateStart date in YYYY-MM-DD-HH-MM format (str).
end_dateOptional end date (str). Default: Current time.
verbosePrints extraction status (bool). Default: True.

👉 Explore advanced trading strategies


3. LiveCryptoData Class

Purpose: Retrieve real-time bid/ask prices and trade metrics.

Basic Usage:

new = LiveCryptoData('ATOM-USD').return_data()

Output:

Arguments:

ArgumentDescription
tickerCryptocurrency pair (str).
verbosePrints extraction progress (bool). Default: True.

FAQ

1. How do I validate a cryptocurrency ticker?

Use the Cryptocurrencies class:

Cryptocurrencies(coin_search='BTC').find_crypto_pairs()

2. What time intervals are supported for historical data?

Supported granularities: 60, 300, 900, 3600, 21600, 86400 seconds.

3. Can I fetch data for a custom date range?

Yes! Specify start_date and optional end_date in YYYY-MM-DD-HH-MM format.

4. Is real-time data available?

Absolutely. Use LiveCryptoData('TICKER').return_data().

5. How do I install the library?

Run:

pip install Historic-Crypto

👉 Master crypto trading with expert insights


Conclusion

Historic Crypto simplifies cryptocurrency data collection—whether for backtesting trading strategies, academic research, or real-time analysis. With its intuitive classes and Pandas integration, it’s a must-have tool for crypto enthusiasts and developers.

Install today and unlock the power of historical and live crypto data! 🚀