WDK logoWDK documentation
StartWalletsDeFi & FiatAI & CLITools

Price Rates

Unified pricing tools for fetching current and historical asset prices

Uses Bitfinex and CoinGecko, subject to Bitfinex's terms and CoinGecko's terms. See Legal and Disclaimers.

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 null instead 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 PricingClient for 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 null from the pricing client so applications can show a clear unavailable-price state

Need Help?

On this page