https://github.com/gerrrg/cgpricequery
cgPriceQuery is an abstraction layer for calling the CoinGecko Price Query API.
https://github.com/gerrrg/cgpricequery
Last synced: 2 months ago
JSON representation
cgPriceQuery is an abstraction layer for calling the CoinGecko Price Query API.
- Host: GitHub
- URL: https://github.com/gerrrg/cgpricequery
- Owner: gerrrg
- Created: 2022-01-08T17:02:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-15T17:05:02.000Z (almost 2 years ago)
- Last Synced: 2025-02-20T10:21:21.386Z (3 months ago)
- Language: Python
- Homepage: https://pypi.org/project/cgPriceQuery/
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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 time `t_0` to `t_1`
* `queryPriceAtTime`: Get price data at time `t`
* `queryPriceCurrent`: Get the current price## Networks
Supported networks are currently:
* ethereum
* polygon
* arbitrum
* fantomAdditional 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`