refactor(bot): update paper trading models, broker integration, background services, and test project

This commit is contained in:
2026-08-24 21:37:10 +02:00
parent 5c95dd182c
commit 7060f0f7b1
32 changed files with 1904 additions and 1477 deletions
@@ -0,0 +1,33 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace FinlyticBot.Database.Entities;
[Table("bot_portfolio_snapshots")]
public class BotPortfolioSnapshotEntity
{
[Key]
public Guid Id { get; set; } = Guid.NewGuid();
public DateTime SnapshotDateUtc { get; set; } = DateTime.UtcNow;
[Column(TypeName = "decimal(18,4)")]
public decimal TotalEquityEur { get; set; }
[Column(TypeName = "decimal(18,4)")]
public decimal CashEur { get; set; }
public int OpenPositionsCount { get; set; }
[Column(TypeName = "decimal(18,4)")]
public decimal DailyRealizedPnlEur { get; set; }
[Column(TypeName = "decimal(18,4)")]
public decimal TotalUnrealizedPnlEur { get; set; }
[Column(TypeName = "decimal(6,2)")]
public decimal? WinRatePercent { get; set; }
public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
}