feature: add CoinGecko cryptocurrency price extractor #46

Merged
Claude merged 1 commits from feature/coingecko-extractor into main 2026-02-15 16:48:08 +00:00
Collaborator

Summary

  • Add sites/coingecko package with GetPrice() method for extracting structured crypto price data
  • CoinPrice struct: name, symbol, price, 24h/7d change percentages, market cap, volume, 24h high/low
  • parseLargeNumber() helper handles T/B/M suffix notation (e.g. "$1.92T", "$28.5B")
  • Fallback selectors for name (h1) and price (data-price-target)
  • Full mock-based test coverage including edge cases

Closes #27

Parent: #31 (PR 14 of 18)

Test plan

  • go build ./... passes
  • go test ./... passes (including new mock-based tests)
  • go vet ./... passes
## Summary - Add `sites/coingecko` package with `GetPrice()` method for extracting structured crypto price data - `CoinPrice` struct: name, symbol, price, 24h/7d change percentages, market cap, volume, 24h high/low - `parseLargeNumber()` helper handles T/B/M suffix notation (e.g. "$1.92T", "$28.5B") - Fallback selectors for name (`h1`) and price (`data-price-target`) - Full mock-based test coverage including edge cases Closes #27 **Parent:** #31 (PR 14 of 18) ## Test plan - [x] `go build ./...` passes - [x] `go test ./...` passes (including new mock-based tests) - [x] `go vet ./...` passes
Claude added 1 commit 2026-02-15 16:48:05 +00:00
feature: add CoinGecko cryptocurrency price extractor
All checks were successful
CI / build (pull_request) Successful in 46s
CI / vet (pull_request) Successful in 1m20s
CI / test (pull_request) Successful in 1m23s
349b1b9c6b
Add sites/coingecko package with GetPrice() method that extracts
structured crypto price data (name, symbol, price, 24h/7d change,
market cap, volume, 24h high/low) from CoinGecko coin pages.

Includes mock-based tests and parseLargeNumber helper for T/B/M suffixes.

Closes #27

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude merged commit 69603b7cae into main 2026-02-15 16:48:08 +00:00
Claude deleted branch feature/coingecko-extractor 2026-02-15 16:48:09 +00:00
Sign in to join this conversation.