/** * Legacy data.ts — thin shim over the provider registry. * * Keeps the historical `string | Data` error-by-string return convention so * the existing callers (`trading.ts`, `tools/index.ts` wiring into * `LiveExchange`) keep working without a call-site rewrite. New code should * import from `./providers/registry.js` and consume `PriceData | ProviderError` * directly — the structured error shape enables UI color-coding and retry * classification the string convention can't express. */ import type { AssetClass, MarketCode } from './providers/standard-models.js'; export interface PriceData { price: number; change24h: number; volume24h: number; marketCap: number; } export interface OHLCVData { closes: number[]; timestamps: number[]; } export interface TrendingCoin { id: string; name: string; symbol: string; marketCapRank: number | null; } export interface MarketCoin { id: string; symbol: string; name: string; price: number; change24h: number; marketCap: number; volume24h: number; } export declare function resolveId(ticker: string): string; /** * Look up a spot price. `assetClass` defaults to 'crypto' so all existing * crypto-only callers (`TradingSignal`, `LiveExchange.getPrice`) behave * exactly as before. Pass 'fx' / 'commodity' / 'stock' (plus a `market` * code for stocks) to hit the multi-asset Gateway endpoints. */ export declare function getPrice(ticker: string, assetClass?: AssetClass, market?: MarketCode): Promise; /** Convenience: FX pair lookup (e.g. "EUR-USD"). */ export declare function getFxPrice(ticker: string): Promise; /** Convenience: commodity lookup (e.g. "XAU-USD" for gold). */ export declare function getCommodityPrice(ticker: string): Promise; /** Convenience: stock lookup (e.g. "AAPL" on market "us"). */ export declare function getStockPrice(ticker: string, market: MarketCode): Promise; export declare function getOHLCV(ticker: string, days?: number): Promise; export declare function getTrending(): Promise; export declare function getMarketOverview(): Promise;