feat(core): update DTOs, Trade Republic client, Yahoo scrapers, and dynamic settings
This commit is contained in:
@@ -1,31 +1,79 @@
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace FinlyticCore.Models.Trades;
|
||||
|
||||
public class TradeAcceptanceDto
|
||||
{
|
||||
[JsonPropertyName("tradeId")]
|
||||
public string TradeId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("analysisId")]
|
||||
public string AnalysisId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("isin")]
|
||||
public string Isin { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("userId")]
|
||||
public string? UserId { get; set; } = "default_user";
|
||||
|
||||
[JsonPropertyName("companyName")]
|
||||
public string? CompanyName { get; set; }
|
||||
|
||||
[JsonPropertyName("sector")]
|
||||
public string? Sector { get; set; }
|
||||
|
||||
[JsonPropertyName("actualEntryPrice")]
|
||||
public decimal? ActualEntryPrice { get; set; }
|
||||
|
||||
[JsonPropertyName("positionSize")]
|
||||
public decimal? PositionSize { get; set; }
|
||||
|
||||
[JsonPropertyName("leverageUsed")]
|
||||
public decimal? LeverageUsed { get; set; } = 1;
|
||||
|
||||
[JsonPropertyName("entryFee")]
|
||||
public decimal? EntryFee { get; set; } = 0;
|
||||
|
||||
[JsonPropertyName("exitFee")]
|
||||
public decimal? ExitFee { get; set; } = 0;
|
||||
|
||||
[JsonPropertyName("symbol")]
|
||||
public string? Symbol { get; set; }
|
||||
|
||||
[JsonPropertyName("signalType")]
|
||||
public string? SignalType { get; set; }
|
||||
|
||||
[JsonPropertyName("entryPrice")]
|
||||
public decimal? EntryPrice { get; set; }
|
||||
|
||||
[JsonPropertyName("stopLoss")]
|
||||
public decimal? StopLoss { get; set; }
|
||||
|
||||
[JsonPropertyName("takeProfit")]
|
||||
public decimal? TakeProfit { get; set; }
|
||||
|
||||
[JsonPropertyName("instrumentType")]
|
||||
public string? InstrumentType { get; set; }
|
||||
|
||||
[JsonPropertyName("derivativeIsin")]
|
||||
public string? DerivativeIsin { get; set; }
|
||||
|
||||
[JsonPropertyName("timeframe")]
|
||||
public string? Timeframe { get; set; }
|
||||
|
||||
[JsonPropertyName("reasoning")]
|
||||
public string? Reasoning { get; set; }
|
||||
|
||||
[JsonPropertyName("executionTimestamp")]
|
||||
public DateTime? ExecutionTimestamp { get; set; }
|
||||
|
||||
[JsonPropertyName("quantity")]
|
||||
public decimal? Quantity { get; set; }
|
||||
|
||||
[JsonPropertyName("knockoutThreshold")]
|
||||
public decimal? KnockoutThreshold { get; set; }
|
||||
|
||||
[JsonPropertyName("isRecurring")]
|
||||
public bool IsRecurring { get; set; } = false;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
using FinlyticCore.Models.Analyzer;
|
||||
|
||||
namespace FinlyticCore.Models.Trades;
|
||||
@@ -9,55 +10,137 @@ namespace FinlyticCore.Models.Trades;
|
||||
/// </summary>
|
||||
public class TradeProposalDto
|
||||
{
|
||||
[JsonPropertyName("tradeId")]
|
||||
public string TradeId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("userId")]
|
||||
public string? UserId { get; set; }
|
||||
|
||||
[JsonPropertyName("isGlobalProposal")]
|
||||
public bool IsGlobalProposal { get; set; } = true;
|
||||
|
||||
[JsonPropertyName("status")]
|
||||
public string Status { get; set; } = "Proposed";
|
||||
|
||||
[JsonPropertyName("analysisId")]
|
||||
public string AnalysisId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("eventId")]
|
||||
public string EventId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("sector")]
|
||||
public string Sector { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("symbol")]
|
||||
public string Symbol { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("isin")]
|
||||
public string Isin { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("companyName")]
|
||||
public string CompanyName { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("entryPrice")]
|
||||
public decimal EntryPrice { get; set; }
|
||||
|
||||
[JsonPropertyName("stopLoss")]
|
||||
public decimal StopLoss { get; set; }
|
||||
|
||||
[JsonPropertyName("takeProfit")]
|
||||
public decimal TakeProfit { get; set; }
|
||||
|
||||
[JsonPropertyName("signalType")]
|
||||
public string SignalType { get; set; } = "BUY"; // "BUY", "SELL"
|
||||
|
||||
[JsonPropertyName("riskTolerance")]
|
||||
public string RiskTolerance { get; set; } = "Moderate"; // "Conservative", "Moderate", "Aggressive"
|
||||
|
||||
[JsonPropertyName("timeframe")]
|
||||
public string Timeframe { get; set; } = "1D"; // "1H", "4H", "1D", "1W"
|
||||
|
||||
[JsonPropertyName("instrumentType")]
|
||||
public string InstrumentType { get; set; } = "Stock"; // "Stock", "Option", "CFD", "Crypto"
|
||||
|
||||
[JsonPropertyName("derivativeIsin")]
|
||||
public string? DerivativeIsin { get; set; }
|
||||
|
||||
[JsonPropertyName("winRate")]
|
||||
public double WinRate { get; set; }
|
||||
|
||||
[JsonPropertyName("vixRegime")]
|
||||
public VixMarketRegime VixRegime { get; set; }
|
||||
|
||||
[JsonPropertyName("vixValue")]
|
||||
public decimal VixValue { get; set; }
|
||||
|
||||
[JsonPropertyName("ttlMinutes")]
|
||||
public int TtlMinutes { get; set; } = 60;
|
||||
|
||||
[JsonPropertyName("reasoning")]
|
||||
public string Reasoning { get; set; } = string.Empty;
|
||||
|
||||
// --- New Fields for Detailed Execution & Rationale ---
|
||||
[JsonPropertyName("entryZoneMin")]
|
||||
public decimal? EntryZoneMin { get; set; }
|
||||
|
||||
[JsonPropertyName("entryZoneMax")]
|
||||
public decimal? EntryZoneMax { get; set; }
|
||||
|
||||
[JsonPropertyName("takeProfitTargets")]
|
||||
public List<decimal>? TakeProfitTargets { get; set; }
|
||||
|
||||
[JsonPropertyName("riskRewardRatio")]
|
||||
public decimal? RiskRewardRatio { get; set; }
|
||||
|
||||
[JsonPropertyName("maxLeverage")]
|
||||
public decimal? MaxLeverage { get; set; }
|
||||
|
||||
[JsonPropertyName("technicalRationale")]
|
||||
public string TechnicalRationale { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("fundamentalRationale")]
|
||||
public string FundamentalRationale { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("riskWarning")]
|
||||
public string RiskWarning { get; set; } = string.Empty;
|
||||
|
||||
// --- Real Trade Execution Data ---
|
||||
[JsonPropertyName("actualEntryPrice")]
|
||||
public decimal? ActualEntryPrice { get; set; }
|
||||
|
||||
[JsonPropertyName("positionSize")]
|
||||
public decimal? PositionSize { get; set; }
|
||||
|
||||
[JsonPropertyName("leverageUsed")]
|
||||
public decimal? LeverageUsed { get; set; }
|
||||
|
||||
[JsonPropertyName("entryFee")]
|
||||
public decimal? EntryFee { get; set; }
|
||||
|
||||
[JsonPropertyName("exitFee")]
|
||||
public decimal? ExitFee { get; set; }
|
||||
|
||||
[JsonPropertyName("executionTimestamp")]
|
||||
public DateTime? ExecutionTimestamp { get; set; }
|
||||
|
||||
[JsonPropertyName("quantity")]
|
||||
public decimal? Quantity { get; set; }
|
||||
|
||||
[JsonPropertyName("knockoutThreshold")]
|
||||
public decimal? KnockoutThreshold { get; set; }
|
||||
|
||||
[JsonPropertyName("isRecurring")]
|
||||
public bool IsRecurring { get; set; } = false;
|
||||
|
||||
[JsonPropertyName("currentPrice")]
|
||||
public decimal? CurrentPrice { get; set; }
|
||||
|
||||
[JsonPropertyName("pnlAbsolute")]
|
||||
public decimal? PnlAbsolute { get; set; }
|
||||
|
||||
[JsonPropertyName("pnlPercent")]
|
||||
public decimal? PnlPercent { get; set; }
|
||||
|
||||
[JsonPropertyName("createdAt")]
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user