Historic Crypto
An open source Python library for the collection of Historical Cryptocurrency data.
This library interacts with the CoinBase Pro API to:
- List the Cyptocurrency Pairs available through the API.
- Return Live Data from the API
- Return historical data from the API in a Pandas DataFrame.
The HistoricalData class returns all attributes (Open, Close, High, Low, Volume) of the selected Cryptocurrency, whilst the Cryptocurrencies class returns all Cryptocurrencies available through the API, with a 'coin_search' parameter if the user wishes to check if that Coin ID is available.
Installation
From Python:
pip install Historic-Crypto
from Historic_Crypto import HistoricalData
from Historic_Crypto import Cryptocurrencies
from Historic_Crypto import LiveCryptoData
Usage
Cryptocurrencies
If you are unsure of the correct 'ticker' to search for:
pip install Historic-Crypto
from Historic_Crypto import Cryptocurrencies
Cryptocurrencies().find_crypto_pairs()
Returns a Pandas DataFrame containing the columns "id" and "display_name" and "status", with the "id" column indicating the search term which should be queried by the other classes within the package.
Additionally, a number of optional arguments can be added:
| Argument | Description |
|---|---|
| coin_search | search for a specific cryptocurrency string (str) Default = None. |
| extended_output | displays either a condensed or extended output (Bool) Default = False. |
| verbose | prints status messages (Bool) Default = True. |
pip install Historic-Crypto
from Historic_Crypto import Cryptocurrencies
data = Cryptocurrencies(coin_search = 'XLM', extended_output=False).find_crypto_pairs()
HistoricalData
Once you know the ticker which you would like to search for, you can search for it using the HistoricalData class.
pip install Historic-Crypto
from Historic_Crypto import HistoricalData
new = HistoricalData('ETH-USD',300,'2020-06-01-00-00').retrieve_data()
The arguments for the class are listed below:
| Argument | Description |
|---|---|
| ticker | supply the ticker information which you want to return (str). |
| granularity | please supply a granularity in seconds (60, 300, 900, 3600, 21600, 86400) (int). |
| start_date | a string in the format YYYY-MM-DD-HH-MM (str). |
| end_date | a string in the format YYYY-MM-DD-HH-MM (str). Optional, Default: Now |
| verbose | printing during extraction. Default: True |
LiveCryptoData
If you want to see the current Bid/Ask of a specific Cryptocurrency:
pip install Historic-Crypto
from Historic_Crypto import LiveCryptoData
new = LiveCryptoData('ATOM-USD').return_data()
Returns a Pandas DataFrame 'data', which contains the trade_id, price, size, bid, ask and volume of the previous transaction, indexed by timestamp.
The arguments for the class are listed below:
| Argument | Description |
|---|---|
| ticker | information for which the user would like to return (str). |
| verbose | print progress during extraction (bool). Default:True |
Metadata
Release files for Historic-Crypto 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Historic_Crypto-0.1.6.tar.gz | 7.0 kB | Without provenance | Details for Historic_Crypto-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Historic_Crypto-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for Historic_Crypto-0.1.6-py3-none-any.whl |
Total release size: 15.8 kB
Release files / Historic_Crypto-0.1.6.tar.gz
| Download URL | Historic_Crypto-0.1.6.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12ddeb6cce58a870f5115dad5fbf55f7637fe15dc2471e19219a13f6e7f47c8d
|
|
BLAKE2b-256 checksum How to use checksums |
b647c4d71709e64b9fe3fc4aaa27b9422209c0f274aa7a28d7b9e350e047b471
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / Historic_Crypto-0.1.6-py3-none-any.whl
| Download URL | Historic_Crypto-0.1.6-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0eee9c315e9c240e774ad06468050b48ca976d4bf4aef0c280cb5cf29fbc9ab2
|
|
BLAKE2b-256 checksum How to use checksums |
0128e0555903c9c03124eccae0bff6fcbea3f44ac06f379ce146f91a0817dda8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for Historic-Crypto 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.