%global _empty_manifest_terminate_build 0
Name: python-Historic-Crypto
Version: 0.1.6
Release: 1
Summary: An open source Python library for scraping Historical Cryptocurrency data.
License: MIT License
URL: https://github.com/David-Woroniuk/Historic_Crypto
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b6/47/c4d71709e64b9fe3fc4aaa27b9422209c0f274aa7a28d7b9e350e047b471/Historic_Crypto-0.1.6.tar.gz
BuildArch: noarch
Requires: python3-numpy
Requires: python3-requests
%description
# Historic Crypto
[](https://pepy.tech/project/historic-crypto) [](https://pepy.tech/project/historic-crypto)
An open source Python library for the collection of Historical Cryptocurrency data.
This library interacts with the [CoinBase Pro][website] 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:
```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:
```python
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**. |
```python
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.
```python
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:
```python
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** |
[website]:
%package -n python3-Historic-Crypto
Summary: An open source Python library for scraping Historical Cryptocurrency data.
Provides: python-Historic-Crypto
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-Historic-Crypto
# Historic Crypto
[](https://pepy.tech/project/historic-crypto) [](https://pepy.tech/project/historic-crypto)
An open source Python library for the collection of Historical Cryptocurrency data.
This library interacts with the [CoinBase Pro][website] 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:
```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:
```python
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**. |
```python
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.
```python
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:
```python
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** |
[website]:
%package help
Summary: Development documents and examples for Historic-Crypto
Provides: python3-Historic-Crypto-doc
%description help
# Historic Crypto
[](https://pepy.tech/project/historic-crypto) [](https://pepy.tech/project/historic-crypto)
An open source Python library for the collection of Historical Cryptocurrency data.
This library interacts with the [CoinBase Pro][website] 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:
```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:
```python
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**. |
```python
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.
```python
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:
```python
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** |
[website]:
%prep
%autosetup -n Historic-Crypto-0.1.6
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-Historic-Crypto -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Fri May 05 2023 Python_Bot - 0.1.6-1
- Package Spec generated