Skip to main content

CoinGecko connector for the parsimony framework

Project description

parsimony-coingecko

CoinGecko connector — crypto market data via the CoinGecko v3 API and on-chain prices via GeckoTerminal.

Part of the parsimony-connectors monorepo. Distributed standalone on PyPI as parsimony-coingecko.

Connectors

11 connectors grouped by capability:

Name Kind Description
coingecko_search fetch Resolve coin names/symbols to CoinGecko IDs.
coingecko_trending fetch Top 7 trending coins by 24-h search volume.
coingecko_top_gainers_losers fetch Top gaining and losing coins over a window.
coingecko_price fetch Current price(s) for one or more coins in one or more vs-currencies.
coingecko_markets fetch Ranked market data (price, market cap, ATH/ATL, 24h change), paged.
coingecko_coin_detail fetch Full per-coin metadata (description, links, market data) — returns nested dict.
coingecko_market_chart fetch Historical price/market-cap/volume over the last N days.
coingecko_market_chart_range fetch Historical price/market-cap/volume between two ISO dates.
coingecko_ohlc fetch OHLC candlesticks for a coin.
coingecko_token_price_onchain fetch On-chain token price by contract address (GeckoTerminal).
enumerate_coingecko enumerator Full coin list (~17 000 rows) for catalog indexing.

coingecko_top_gainers_losers is PRO-only, and coingecko_market_chart_range beyond 365 days is restricted on the Demo plan — both return PaymentRequiredError on a Demo key.

Install

pip install parsimony-coingecko

Pulls in parsimony-core>=0.7,<0.8 automatically. Verify discovery:

python -c "from parsimony import discover; print([p.name for p in discover.iter_providers()])"

Configuration

Set the following environment variable:

export COINGECKO_API_KEY="<your-key>"

Get a Demo key at https://www.coingecko.com/en/api/pricing.

Quick start

import os
from parsimony_coingecko import load

# Bind the key off the call surface (kept out of provenance and logs).
connectors = load(api_key=os.environ["COINGECKO_API_KEY"])
result = connectors["coingecko_price"](ids="bitcoin", vs_currencies="usd")
print(result.data.head())

If the key is not bound, each connector falls back to COINGECKO_API_KEY from the environment, and a missing key fails fast with UnauthorizedError.

For multi-plugin composition:

from parsimony import discover
connectors = discover.load_all()

Provider

License

See LICENSE.

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

parsimony_coingecko-0.0.1.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parsimony_coingecko-0.0.1-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file parsimony_coingecko-0.0.1.tar.gz.

File metadata

  • Download URL: parsimony_coingecko-0.0.1.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for parsimony_coingecko-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9ed717997d710d9596b9cfc05dbec84d5bdf17ab4dc694d2d7c64f7be3e668e6
MD5 e1555f7790d30008d9c2a4762bcaff3a
BLAKE2b-256 3323d2923a05c686f0f937ffe09f21d7967bfaf9fdd68e336d739d6f2a8fcc6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_coingecko-0.0.1.tar.gz:

Publisher: release.yml on ockham-sh/parsimony-connectors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file parsimony_coingecko-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for parsimony_coingecko-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d8d383cb57525a220a101ebf7eea9aaee7e62446682b8f63efaacc5927dbdf2
MD5 9edab3631b1f814206d293a8ca0f451d
BLAKE2b-256 e53ab14acbb53e2535036b147aa17ed345a4ae40254bd2adf30183ef001f674d

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_coingecko-0.0.1-py3-none-any.whl:

Publisher: release.yml on ockham-sh/parsimony-connectors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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