Price Rates
Unified pricing tools for fetching current and historical asset prices
Pricing utilities for WDK apps. Includes HTTP clients and providers to retrieve current and historical prices from supported services.
Each data source ships as its own pricing client: @tetherto/wdk-pricing-bitfinex-http for Bitfinex and @tetherto/wdk-pricing-coingecko-http for CoinGecko. Both implement the same PricingClient interface, so you can call either one directly or pass one or more of them to @tetherto/wdk-pricing-provider for caching and failover.
Pass common ticker symbols such as BTC or USDT. Each client translates them into its provider's own identifiers, and lets you add or override mappings: see currency-code overrides for Bitfinex and coin ID overrides for CoinGecko.
Features
- Current Prices: Fetch latest price for one pair or many pairs in a batch (e.g., BTC/USD)
- Clear Unavailable State: Pairs a provider has no quote for return
nullinstead of an estimated price - Historical Series: Retrieve historical price series; long histories can be downscaled for charts
- Multiple Data Sources: Choose Bitfinex or CoinGecko, or implement
PricingClientfor your own source - Caching and Failover: Wrap one client, or an ordered list of clients, with
@tetherto/wdk-pricing-provider - Lightweight HTTP Client: Minimal dependencies; easy to integrate
Why this matters
- Consistent pricing is required for balance valuations, charts, and quotes
- A unified client reduces integration time and data handling errors
- Unsupported pairs return
nullfrom the pricing client so applications can show a clear unavailable-price state
Price Rates Overview
Get started with WDK price clients
Price Rates API
Check the API Reference and examples
CoinGecko HTTP
Use CoinGecko for current prices and historical series