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

Uploaded Source

Built Distribution

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

Uploaded Python 3

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

Hashes for cgPriceQuery-0.0.0a9.tar.gz
Algorithm Hash digest
SHA256 1f18943416ed51e89a46c7bd4ed035b3282c47c61d479b693384e61b06ecd04e
MD5 effe3919d7640bc9b14743a76f135342
BLAKE2b-256 de3602669c6e3f3b4e695e29eca8e97ef22ce218c72cee2b3f461613891651ec

See more details on using hashes here.

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

Hashes for cgPriceQuery-0.0.0a9-py3-none-any.whl
Algorithm Hash digest
SHA256 27808ba199a2423176e9cd34fbd6210fdfe70191cb7baa8ab77727a25d5c0609
MD5 629d696581eec01aa844934ee5efe6bf
BLAKE2b-256 5eb987cd0899a95aef5f02de6040ada40c1306d50cdf6aeb9f0a54b0dd1cce3b

See more details on using hashes here.

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