Skip to main content

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 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
  • 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


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 hashes)

Uploaded Source

Built Distribution

cgPriceQuery-0.0.0a9-py3-none-any.whl (8.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page