Crypto-price widgets for led-ticker (CoinGecko).
Project description
led-ticker-crypto
A cryptocurrency price ticker plugin for led-ticker, backed by the free CoinGecko v3 API. It contributes a crypto.coingecko Container widget that cycles one scrolling price line per configured coin — configure one coin for a single ticker, or a list to cycle through several.
Each line shows the coin symbol, current price (adaptive precision — sub-dollar tokens never collapse to 0.0000), and 24-hour percent change. The change value is trend-colored: green for positive, red for negative, gray for neutral — readable at a glance on any panel.
Prerequisites
- A working led-ticker install.
- Internet access on the Pi (the widget calls the CoinGecko public API).
Install
The widget auto-registers via the led_ticker.plugins entry point — once the package is installed, no [plugins] config change is needed.
Into a containerized led-ticker (recommended): add this package to config/requirements-plugins.txt (copy it from config/requirements-plugins.example.txt, which already lists it), then rebuild:
# in your led-ticker checkout
cp config/requirements-plugins.example.txt config/requirements-plugins.txt
docker compose up -d --build
That example file lists every first-party plugin — trim the live copy to just the ones you want. The crypto line is:
git+https://github.com/JamesAwesome/led-ticker-crypto.git@main
Standalone (a venv that already has led-ticker):
pip install "git+https://github.com/JamesAwesome/led-ticker-crypto.git@main"
led-ticker isn't on PyPI, so this path only works where led-ticker is already installed. See the led-ticker Plugins docs for the constraint-based install the Docker image uses.
Configuration
Reference the widget in a playlist section by type = "crypto.coingecko". Three coin-spec styles are supported — choose the one that fits your workflow:
Single coin (legacy style)
[[playlist.section.widget]]
type = "crypto.coingecko"
symbol = "BTC"
symbol_id = "bitcoin"
currency = "USD"
Multiple coins by explicit CoinGecko id
[[playlist.section.widget]]
type = "crypto.coingecko"
symbol_ids = ["bitcoin", "ethereum", "dogecoin"]
currency = "USD"
Each id in symbol_ids is also used as the on-panel label (uppercased). Use symbol_ids when you know the exact CoinGecko ids and want to skip the startup lookup.
Multiple coins by ticker symbol (auto-resolved)
[[playlist.section.widget]]
type = "crypto.coingecko"
symbols = ["BTC", "ETH", "SOL"]
currency = "USD"
symbols are resolved at startup against CoinGecko's /coins/list endpoint. Resolution is unique-or-error: if a symbol matches more than one CoinGecko id, the widget fails at startup and lists the candidate ids — use symbol_id or symbol_ids to disambiguate.
You can combine all three styles in one widget; duplicates (by coin id) are silently dropped, keeping the first occurrence.
New to led-ticker configs? The first-config tutorial walks through the overall structure — the blocks above show just the crypto-specific keys.
Finding symbol_id
symbol_id is CoinGecko's internal coin identifier (e.g. "bitcoin", "ethereum", "solana", "dogecoin"). It's the id field in CoinGecko's /coins/list endpoint and appears in a coin's page URL: coingecko.com/en/coins/<id>.
Use symbol_id (or symbol_ids) when:
- You want to skip the startup
/coins/listlookup thatsymbolstriggers. - A symbol is ambiguous — the startup error lists the candidates and tells you which ids to use.
Options
| Option | Type | Default | Description |
|---|---|---|---|
symbol |
string | — | Single-coin label shown on the panel (e.g. "BTC"). Requires symbol_id. |
symbol_id |
string | — | Single-coin CoinGecko id (e.g. "bitcoin"). Requires symbol. |
symbols |
list of strings | — | Ticker symbols auto-resolved to CoinGecko ids at startup (e.g. ["BTC", "ETH"]). Unique-or-error. |
symbol_ids |
list of strings | — | CoinGecko ids used directly, uppercased as panel labels (e.g. ["bitcoin", "ethereum"]). |
currency |
string | "USD" |
Fiat currency code (e.g. "USD", "EUR"). |
update_interval |
int | 300 |
Seconds between CoinGecko fetches (5 min default). |
center |
bool | true |
Center the ticker on the canvas when it fits; scroll when it overflows. |
padding |
int | 6 |
Horizontal spacing (logical px) between the symbol, price, and change segments. |
hold_time |
float | 0.0 |
Seconds to hold each coin's ticker before the engine cycles to the next. |
bg_color |
[r,g,b] |
none | Background fill behind the ticker. |
font_color |
[r,g,b] / string / table |
yellow (255,255,0) |
Color for the symbol and price. Accepts any led-ticker color provider (e.g. "rainbow", {style="shimmer", ...}). The 24h change color is always trend-colored and ignores this field. |
At least one of symbol+symbol_id, symbols, or symbol_ids must be specified — the widget fails at config validation otherwise.
Rate limits & API key
CoinGecko's keyless free tier allows roughly 5 requests per minute. For a single low-frequency widget at the default 5-minute interval this is plenty; if you add more coins or shorten update_interval, you may hit HTTP 429. When that happens the widget logs the rate-limit clearly and lets its monitor loop back off — it will not show stale garbage.
To raise the limit, create a free account at coingecko.com and get a Demo API key (no credit card required). Supply it via the COINGECKO_API_KEY environment variable (the only supported path — config-file secrets are intentionally not accepted):
export COINGECKO_API_KEY="CG-xxxxxxxxxxxxxxxxxxxx"
The key is sent as the x-cg-demo-api-key request header.
Development
led-ticker isn't on PyPI, so this plugin resolves it from a sibling checkout. Clone both side by side:
~/projects/.../led-ticker
~/projects/.../led-ticker-crypto
uv sync --extra dev # resolves led-ticker from ../led-ticker
uv run pytest -q
uv run ruff check src tests
Note: led-ticker's
graphicssurface works headless via its bundled stub, but the fullRGBMatrix/canvas test stub lives in led-ticker'stests/stubs/and isn't shipped. This repo's tests put it on the path viapyproject.toml's[tool.pytest.ini_options] pythonpath = ["../led-ticker/tests/stubs"].
The plugin imports only the public led_ticker.plugin surface — tests/test_import_purity.py enforces it.
Links
- led-ticker — the core project
- Docs site · Plugin system
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file led_ticker_crypto-0.2.0.tar.gz.
File metadata
- Download URL: led_ticker_crypto-0.2.0.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b828204d730e734a6d5e7e697f27cb948c71d00a95d09a1fc5a4cbc9719425d7
|
|
| MD5 |
b48a3dc5210eea0e6f439ef8fb71078e
|
|
| BLAKE2b-256 |
3288d6391ba4bd29df21bf9e0a14eb17180a9690aaf817d9b536728e07bf4cbc
|
Provenance
The following attestation bundles were made for led_ticker_crypto-0.2.0.tar.gz:
Publisher:
publish.yml on JamesAwesome/led-ticker-plugins
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
led_ticker_crypto-0.2.0.tar.gz -
Subject digest:
b828204d730e734a6d5e7e697f27cb948c71d00a95d09a1fc5a4cbc9719425d7 - Sigstore transparency entry: 1917395665
- Sigstore integration time:
-
Permalink:
JamesAwesome/led-ticker-plugins@7cae3e69249a7d16e425ef38c3e97f1eaf2d6bc0 -
Branch / Tag:
refs/tags/crypto-v0.2.0 - Owner: https://github.com/JamesAwesome
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7cae3e69249a7d16e425ef38c3e97f1eaf2d6bc0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file led_ticker_crypto-0.2.0-py3-none-any.whl.
File metadata
- Download URL: led_ticker_crypto-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0306b23c362a894f155514e49ec69a8c5238039b4884a8ba6daa23700b94ae7a
|
|
| MD5 |
d844152c40fd8c9a71e4408022b3296b
|
|
| BLAKE2b-256 |
04089a26fe889d235f11bcb4cb579340f5ca31c4904ad5b95f213041bcb60d7e
|
Provenance
The following attestation bundles were made for led_ticker_crypto-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on JamesAwesome/led-ticker-plugins
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
led_ticker_crypto-0.2.0-py3-none-any.whl -
Subject digest:
0306b23c362a894f155514e49ec69a8c5238039b4884a8ba6daa23700b94ae7a - Sigstore transparency entry: 1917395719
- Sigstore integration time:
-
Permalink:
JamesAwesome/led-ticker-plugins@7cae3e69249a7d16e425ef38c3e97f1eaf2d6bc0 -
Branch / Tag:
refs/tags/crypto-v0.2.0 - Owner: https://github.com/JamesAwesome
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7cae3e69249a7d16e425ef38c3e97f1eaf2d6bc0 -
Trigger Event:
release
-
Statement type: