using Predictalytics.Domain.Enums; namespace Predictalytics.Domain.Entities; /// /// High-resolution analytics context for a specific trade. /// Collected asynchronously after a trade is discovered to calculate Slippage and Edge. /// Only collected for Watchlisted or high-scoring traders to conserve database space. /// public class TradeContext { public long Id { get; set; } /// The ID of the parent trade. public long TradeId { get; set; } public Trade Trade { get; set; } = null!; /// The estimated mid-price of the asset roughly 1 minute before the trade execution. public decimal? PriceBefore1m { get; set; } /// The estimated mid-price of the asset roughly 1 minute after the trade execution. public decimal? PriceAfter1m { get; set; } /// The volume-weighted exact follower fill price 10 seconds after the trade execution (excluding the trader's own trades). public decimal? FollowerFillPrice10s { get; set; } /// The volume-weighted exact follower fill price 60 seconds after the trade execution (excluding the trader's own trades). public decimal? FollowerFillPrice60s { get; set; } /// Calculated slippage: execution price vs PriceBefore1m. public decimal? EstimatedSlippage { get; set; } /// Estimated order type based on fee or exact price matching. public OrderType EstimatedOrderType { get; set; } = OrderType.Unknown; }