Historical and current CoinGecko price queries
Project description
cgPriceQuery
cgPriceQuery is an abstraction layer for calling the CoinGecko Price Query API. Since the densest data from CoinGecko is typically returned hourly, this package interpolates prices to each block time.
Query types
queryPricesInDuration
: Get price data at each block time from timet_0
tot_1
queryPriceAtTime
: Get price data at timet
queryPriceCurrent
: Get the current price
Networks
Supported networks are currently:
- ethereum
- polygon
- arbitrum
- fantom
Additional networks are pretty trivial to add as long as they have a subgraph for block times and CoinGecko price feeds.
Sample
For a sample, see samples/sample.py
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
cgPriceQuery-0.0.0a9.tar.gz
(7.5 kB
view details)
Built Distribution
File details
Details for the file cgPriceQuery-0.0.0a9.tar.gz
.
File metadata
- Download URL: cgPriceQuery-0.0.0a9.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f18943416ed51e89a46c7bd4ed035b3282c47c61d479b693384e61b06ecd04e |
|
MD5 | effe3919d7640bc9b14743a76f135342 |
|
BLAKE2b-256 | de3602669c6e3f3b4e695e29eca8e97ef22ce218c72cee2b3f461613891651ec |
File details
Details for the file cgPriceQuery-0.0.0a9-py3-none-any.whl
.
File metadata
- Download URL: cgPriceQuery-0.0.0a9-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27808ba199a2423176e9cd34fbd6210fdfe70191cb7baa8ab77727a25d5c0609 |
|
MD5 | 629d696581eec01aa844934ee5efe6bf |
|
BLAKE2b-256 | 5eb987cd0899a95aef5f02de6040ada40c1306d50cdf6aeb9f0a54b0dd1cce3b |