feat(Trades): refactor trades MQTT client and DTOs
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace FinlyticTrades.Entities;
|
||||
|
||||
[Table("trade_hourly_updates")]
|
||||
[Index(nameof(TradeId), nameof(Timestamp))]
|
||||
public class TradeHourlyUpdateEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
[Required]
|
||||
public Guid TradeId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(TradeId))]
|
||||
public TradeEntity? Trade { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(30)]
|
||||
public string Recommendation { get; set; } = "Hold"; // "Hold", "AdjustSL", "AdjustTP", "Close"
|
||||
|
||||
[Column(TypeName = "decimal(18,4)")]
|
||||
public decimal CurrentPrice { get; set; }
|
||||
|
||||
[Column(TypeName = "decimal(18,4)")]
|
||||
public decimal? SuggestedStopLoss { get; set; }
|
||||
|
||||
[Column(TypeName = "decimal(18,4)")]
|
||||
public decimal? SuggestedTakeProfit { get; set; }
|
||||
|
||||
[Column(TypeName = "decimal(18,4)")]
|
||||
public decimal VixValue { get; set; }
|
||||
|
||||
[Column(TypeName = "decimal(18,4)")]
|
||||
public decimal? FloatingPnlPercent { get; set; }
|
||||
|
||||
public string Reasoning { get; set; } = string.Empty;
|
||||
|
||||
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
Reference in New Issue
Block a user