Skip to main content

GeckoRS

geckors is a small Python wrapper around CoinGecko's public API for token metadata.

It is designed for:

  • resolving a ticker or CoinGecko ID into a token
  • caching token metadata locally in SQLite
  • keeping dependencies minimal
  • exposing a simple object API for common fields such as contract addresses, decimals, and supply

The project is intentionally metadata-focused. It does not try to be a full market-data client.

Features

  • CoinGecko-backed token lookup
  • local SQLite cache
  • normalized contract storage in token_contracts
  • alias resolution in token_aliases so repeated lookups are deterministic
  • high-level Token object with useful properties
  • bulk population helpers
  • rate-limit-safe bulk fetch behavior

Installation

Using uv:

uv sync

Or install the package in editable mode:

uv pip install -e .

Quick Start

from geckors import Token

token = Token("ETH")

print(token.id)
print(token.name)
print(token.contract_addresses)
print(token.decimals)
print(token.max_supply)

Useful properties on Token include:

  • id
  • symbol
  • name
  • market_cap_rank
  • asset_platform_id
  • contract_addresses
  • platform_details
  • decimals
  • circulating_supply
  • total_supply
  • max_supply
  • categories
  • links
  • homepage
  • description
  • developer_data
  • community_data
  • public_interest_stats
  • raw

Example:

from geckors import Token

token = Token("DAI")
print(token.get_address("ethereum"))
print(token.contract_addresses)

Bulk Population

Populate from symbols:

from geckors import populate_tokens

result = populate_tokens(["BTC", "ETH", "DAI", "WETH"])
print(result)

Populate from explicit CoinGecko IDs:

from geckors import populate_token_ids

result = populate_token_ids(["bitcoin", "ethereum", "dai"])
print(result)

populate_tokens() returns structured results for:

  • resolved queries
  • inserted IDs
  • skipped rows already in cache
  • unresolved queries
  • ambiguous symbols
  • failed requests
  • rate-limit state

Storage

By default the SQLite database is stored in the platform data directory:

  • Linux/BSD: ~/.local/share/geckors/gecko_rs.db or $XDG_DATA_HOME/geckors/gecko_rs.db
  • macOS: ~/Library/Application Support/geckors/gecko_rs.db
  • Windows: %LOCALAPPDATA%/geckors/gecko_rs.db

Override order:

  1. GECKO_RS_DB
  2. config.json in the config directory
  3. platform data directory default

Current tables:

  • tokens: canonical token metadata keyed by CoinGecko ID
  • token_contracts: normalized chain/address/decimals rows
  • token_aliases: query-to-token resolution cache

CoinGecko Notes

  • CoinGecko ID is the stable internal identity in this project. Symbols are only lookup hints.
  • Native assets like ETH may not have token contract addresses. CoinGecko often returns an empty placeholder for those; geckors filters that out.
  • Contract coverage is limited to what CoinGecko currently lists for that specific asset ID.
  • A successful response is not partially truncated by rate limiting. If CoinGecko rate-limits a request, the request fails.

Rate Limits

This project uses CoinGecko public endpoints. Public usage is rate-limited.

Bulk helpers are defensive:

  • they stop cleanly on HTTP 429 by default
  • they return a structured summary instead of crashing the whole run

You can also provide:

  • COINGECKO_DEMO_API_KEY
  • COINGECKO_PRO_API_KEY

if you have one.

Development

Run tests:

uv run python -m unittest discover -s tests -v

Run the example entrypoint:

uv run python main.py

Metadata

Release files for geckors 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geckors 0.1.0
File Size Uploaded
geckors-0.1.0.tar.gz 15.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for geckors 0.1.0
File Interpreter ABI Platform
geckors-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.3 kB

Release files / geckors-0.1.0.tar.gz

Download URL geckors-0.1.0.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bf2cc416eb87b88fbb1c19545a44e85e852abe066c892bebc4877e7ae8cc95b1
BLAKE2b-256 checksum
How to use checksums
40a261c994a297b55a07d55ddf4a5cff8d7046daf2f48c95c440af9e52c2e582
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / geckors-0.1.0-py3-none-any.whl

Download URL geckors-0.1.0-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26b18d6ad58d829da8e420ce1f90372672f082ec2e02fe6cd7c77dc0f73d8c96
BLAKE2b-256 checksum
How to use checksums
aeac594c84b0542a2952f6399b178f313f5ed658bb87f1c3efdc8dc0c624ac88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page