feat: add TradeContext, Subcategory and LastAnalyzedAt
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using Predictalytics.Domain.Enums;
|
||||
|
||||
namespace Predictalytics.Domain.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public class TradeContext
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>The ID of the parent trade.</summary>
|
||||
public long TradeId { get; set; }
|
||||
public Trade Trade { get; set; } = null!;
|
||||
|
||||
/// <summary>The estimated mid-price of the asset roughly 1 minute before the trade execution.</summary>
|
||||
public decimal? PriceBefore1m { get; set; }
|
||||
|
||||
/// <summary>The estimated mid-price of the asset roughly 1 minute after the trade execution.</summary>
|
||||
public decimal? PriceAfter1m { get; set; }
|
||||
|
||||
/// <summary>Calculated slippage: execution price vs PriceBefore1m.</summary>
|
||||
public decimal? EstimatedSlippage { get; set; }
|
||||
|
||||
/// <summary>Estimated order type based on fee or exact price matching.</summary>
|
||||
public OrderType EstimatedOrderType { get; set; } = OrderType.Unknown;
|
||||
}
|
||||
Reference in New Issue
Block a user