Interface in Python for the Live Coin Watch API
Project description
LiveCoinWatch
A Python interface for the (LiveCoinWatch API)[https://www.livecoinwatch.com/]
Install
pip install LiveCoinWatch
Env
Create: python3source myvenv/bin/activate -m venv venv
Active: source venv/bin/activate
Implementation
from livecoinwatch import LiveCoinWatch
coin_data = LiveCoinWatch("<YOUR_API_KEY>")
Example
from livecoinwatch import LiveCoinWatch
from dotenv import dotenv_values
config = dotenv_values(".env")
api_key = config['LIVECOINWATCH_API_KEY']
base_currency = "GBP"
coins = ["ETH","BTC","XRP","SHIB"]
coin_data = LiveCoinWatch(api_key, "GBP")
for coin in coins:
# Call 'coins/single/history'
historic_values = coin_data.coin__history(
code=coin,
currency=base_currency,
start=1617035100000,
end=1617035400000)
print(historic_values)
print("\n")
# Call 'coins/map'
latest_values = coin_data.coins__map(
codes= coins,
currency=base_currency,
sort="rank",
offset=0,
limit=0)
print(latest_values)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
LiveCoinWatch-1.0.0.tar.gz
(2.3 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file LiveCoinWatch-1.0.0.tar.gz.
File metadata
- Download URL: LiveCoinWatch-1.0.0.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b1de5a4fcca234c13ab32ce63ebfdc31ea57d78a2af037be5f2d7d14b058409
|
|
| MD5 |
37f9558f76227dd88de57997142d8fe0
|
|
| BLAKE2b-256 |
937764115aad201b13c1a2c6bab1e3b40d4a5997efc7d01cb9457d97df7d96f3
|
File details
Details for the file LiveCoinWatch-1.0.0-py3-none-any.whl.
File metadata
- Download URL: LiveCoinWatch-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c704e485046588c83eabaeb91b58c979f35d83c7c6a2eda2b559cea67d87305
|
|
| MD5 |
e8b68c05d237d0eb9ec61b563623aaf7
|
|
| BLAKE2b-256 |
6e6ac54a330331d53e5dbf5c56b3efc378b2b9ea83a0ccf5dac5ee2845913f56
|