UNPKG

@barfinex/types

Version:

Core TypeScript type definitions and shared interfaces for the Barfinex ecosystem. Provides strongly-typed contracts for modules, services, and plugins.

43 lines 1.11 kB
export type TradePositionSide = 'LONG' | 'SHORT'; export interface TradeOutcome { strategyId: string; decisionId: string; symbol: string; entryPrice: number; exitPrice: number; positionSide: TradePositionSide; positionSize: number; realizedPnl: number; grossProfit: number; grossLoss: number; mae: number; mfe: number; tradeDuration: number; exitReason: string; regime?: string; timestamp: string; } export interface StrategyPerformanceStats { strategyId: string; windowSize: number; tradeCount: number; realizedPnl: number; grossProfit: number; grossLoss: number; profitFactor: number; expectancy: number; avgMae: number; avgMfe: number; avgTradeDuration: number; winRate: number; lastUpdatedAt: string; } export interface OutcomeAccountingSnapshot { decisionId: string; strategyId: string; symbol: string; tradeOutcome: TradeOutcome; strategyPerformance: StrategyPerformanceStats[]; timestamp: string; } //# sourceMappingURL=trade-outcome-accounting.interface.d.ts.map