/** * Trading Formatters for autonoma Agent Core * * Formatting utilities for displaying trading data in a consistent manner. */ import { Order, Position, Portfolio, TokenPrice, YieldOpportunity } from './types.js'; /** * Format currency amount with appropriate decimal places */ export declare function formatCurrency(amount: number, currency?: string, decimals?: number): string; /** * Format cryptocurrency amount with appropriate precision */ export declare function formatCrypto(amount: number, symbol: string, decimals?: number): string; /** * Format percentage with color coding */ export declare function formatPercentage(value: number, decimals?: number, showSign?: boolean): { text: string; color: 'green' | 'red' | 'gray'; }; /** * Format large numbers with appropriate units (K, M, B) */ export declare function formatLargeNumber(value: number, decimals?: number): string; /** * Format date for trading displays */ export declare function formatTradingDate(date: Date): string; /** * Format relative time (e.g., "2 minutes ago") */ export declare function formatRelativeTime(date: Date): string; /** * Format duration in human readable format */ export declare function formatDuration(milliseconds: number): string; /** * Format order for display */ export declare function formatOrder(order: Order): { id: string; symbol: string; side: string; type: string; amount: string; price: string; status: string; filled: string; time: string; }; /** * Format position for display */ export declare function formatPosition(position: Position): { symbol: string; quantity: string; avgPrice: string; marketValue: string; pnl: { text: string; color: 'green' | 'red' | 'gray'; }; change: { text: string; color: 'green' | 'red' | 'gray'; }; }; /** * Format portfolio summary */ export declare function formatPortfolioSummary(portfolio: Portfolio): { totalValue: string; cash: string; invested: string; dayPnL: { text: string; color: 'green' | 'red' | 'gray'; }; totalPnL: { text: string; color: 'green' | 'red' | 'gray'; }; lastUpdate: string; }; /** * Format token price for display */ export declare function formatTokenPrice(price: TokenPrice): { symbol: string; price: string; change: { text: string; color: 'green' | 'red' | 'gray'; }; volume: string; marketCap: string; lastUpdate: string; }; /** * Format yield opportunity for display */ export declare function formatYieldOpportunity(opportunity: YieldOpportunity): { protocol: string; pool: string; apy: { text: string; color: 'green' | 'red' | 'gray'; }; tvl: string; risk: { text: string; color: 'green' | 'yellow' | 'red'; }; category: string; blockchain: string; minDeposit: string; }; /** * Format order status with color coding */ export declare function formatOrderStatus(status: string): { text: string; color: 'green' | 'yellow' | 'red' | 'blue' | 'gray'; }; /** * Format risk level with color coding */ export declare function formatRiskLevel(risk: string): { text: string; color: 'green' | 'yellow' | 'red'; icon: string; }; /** * Format data for chart display */ export declare function formatChartData(data: Array<{ timestamp: Date; value: number; }>, type: 'price' | 'percentage' | 'volume'): Array<{ x: string; y: number; formatted: string; }>; /** * Format trading session summary */ export declare function formatTradingSession(session: { duration: number; trades: number; pnl: number; winRate: number; avgTradeSize: number; }): { duration: string; trades: string; pnl: { text: string; color: 'green' | 'red' | 'gray'; }; winRate: { text: string; color: 'green' | 'red' | 'gray'; }; avgTradeSize: string; }; //# sourceMappingURL=formatters.d.ts.map