What problem does it solve?
This Skill provides patterns and utilities to fetch BTC-to-fiat exchange rates from Coinbase, cache them, convert between BTC, sats, and fiat, and display rates in a React UI.
Core Features & Use Cases
- Fetch BTC fiat rates: Retrieve BTC-to-fiat rates (e.g., USD, EUR) from Coinbase API.
- Module-level caching: Cache rates to minimize API calls and respect rate limits.
- Conversion utilities: Convert between BTC, sats, and fiat currencies.
- React hooks for UI: Use hooks to display real-time rates in wallet UIs and dashboards.
- Error handling with fallback: Provide stale-cache fallback when API requests fail.
- Multi-currency support: Access rates for a wide range of fiat currencies.
Quick Start
Integrate the exchange-rate service into your UI, then use the provided fetch function or React hook to obtain current rates and perform BTC↔fiat conversions in your components.