feature: CoinGecko cryptocurrency price extractor #27
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Mort has a
.cryptocommand (pkg/crypto/crypto.go) that displays cryptocurrency prices with charts. Currently it screenshots a self-hosted chart endpoint using go-extractor. A CoinGecko site extractor would provide structured price data that could complement or replace the screenshot approach.CoinGecko is the most widely used free crypto data aggregator and doesn't require an API key for basic page scraping.
Proposed API
URL Pattern
https://www.coingecko.com/en/coins/{coin-id}— e.g.,https://www.coingecko.com/en/coins/bitcoinBenefits
.cryptocommandImplemented in PR #46. Added
sites/coingeckopackage withGetPrice()method returningCoinPrice(name, symbol, price, 24h/7d change, market cap, volume, 24h high/low). IncludesparseLargeNumber()for T/B/M suffix handling and full mock-based test coverage.