Initial commit: Predictalytics solution
Clean Architecture .NET 8 solution (Domain/Application/Infrastructure/Api/Worker/WinFormsHost) for analyzing Polymarket traders for copytrading/strategy-replication candidates. Includes EF Core InitialBaseline migration and DB secrets removed from source/config in preparation for version control.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
namespace Predictalytics.Application.DTOs;
|
||||
|
||||
public record DashboardDto(
|
||||
int TotalTraders,
|
||||
int ActiveTraders24h,
|
||||
int TotalTrades,
|
||||
decimal TotalVolume24h,
|
||||
int UnreadAlerts,
|
||||
int WatchlistCount,
|
||||
IReadOnlyList<TraderDto> TopTraders,
|
||||
IReadOnlyList<TradeDto> RecentTrades,
|
||||
IReadOnlyList<AlertDto> RecentAlerts,
|
||||
PlatformBreakdownDto PlatformBreakdown
|
||||
);
|
||||
|
||||
public record PlatformBreakdownDto(
|
||||
Dictionary<string, int> TraderCounts,
|
||||
Dictionary<string, decimal> VolumeCounts
|
||||
);
|
||||
|
||||
public record AlertDto(
|
||||
int Id,
|
||||
string Type,
|
||||
string Platform,
|
||||
string Title,
|
||||
string Message,
|
||||
int Severity,
|
||||
bool IsRead,
|
||||
DateTime CreatedAt,
|
||||
string? TraderName
|
||||
);
|
||||
@@ -0,0 +1,25 @@
|
||||
namespace Predictalytics.Application.DTOs;
|
||||
|
||||
public class MarketDetailDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Platform { get; set; } = "";
|
||||
public string PlatformMarketId { get; set; } = "";
|
||||
public string Question { get; set; } = "";
|
||||
public string? Description { get; set; }
|
||||
public string Category { get; set; } = "";
|
||||
public double Volume { get; set; }
|
||||
public double Liquidity { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
public bool IsResolved { get; set; }
|
||||
public string? ResolutionOutcome { get; set; }
|
||||
public string? ImageUrl { get; set; }
|
||||
public IReadOnlyList<MarketOutcomeDto> Outcomes { get; set; } = new List<MarketOutcomeDto>();
|
||||
public IReadOnlyList<TradeDto> RecentTrades { get; set; } = new List<TradeDto>();
|
||||
}
|
||||
|
||||
public class MarketOutcomeDto
|
||||
{
|
||||
public string Name { get; set; } = "";
|
||||
public double Price { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Predictalytics.Application.DTOs;
|
||||
|
||||
public class MarketDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Platform { get; set; } = "";
|
||||
public string Question { get; set; } = "";
|
||||
public double Volume { get; set; }
|
||||
public double Liquidity { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
public bool IsResolved { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Predictalytics.Application.DTOs;
|
||||
|
||||
public class SearchResultsDto
|
||||
{
|
||||
public IReadOnlyList<TraderDto> Traders { get; set; } = new List<TraderDto>();
|
||||
public IReadOnlyList<MarketDto> Markets { get; set; } = new List<MarketDto>();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Predictalytics.Domain.Enums;
|
||||
|
||||
namespace Predictalytics.Application.DTOs;
|
||||
|
||||
public record TradeDto(
|
||||
long Id,
|
||||
int TraderId,
|
||||
string TraderName,
|
||||
string Platform,
|
||||
int? DbMarketId,
|
||||
string MarketId,
|
||||
string Outcome,
|
||||
string Side,
|
||||
decimal Price,
|
||||
decimal Size,
|
||||
decimal Amount,
|
||||
DateTime ExecutedAt
|
||||
);
|
||||
@@ -0,0 +1,21 @@
|
||||
using Predictalytics.Domain.Enums;
|
||||
|
||||
namespace Predictalytics.Application.DTOs;
|
||||
|
||||
public record TraderDeepDiveDto(
|
||||
int TraderId,
|
||||
string DisplayName,
|
||||
PlatformType Platform,
|
||||
StrategyType ClassifiedStrategy,
|
||||
bool IsSuspectedBot,
|
||||
decimal AvgHoldDurationHours,
|
||||
decimal AvgPositionSizeUsd,
|
||||
int MarketsTraded,
|
||||
decimal HedgingFrequency,
|
||||
decimal TimingAccuracy,
|
||||
decimal EntryQuality,
|
||||
decimal ExitQuality,
|
||||
string[] BotIndicators,
|
||||
string Summary,
|
||||
IReadOnlyList<TradeDto> TradeHistory
|
||||
);
|
||||
@@ -0,0 +1,44 @@
|
||||
using Predictalytics.Domain.Enums;
|
||||
|
||||
namespace Predictalytics.Application.DTOs;
|
||||
|
||||
public record TraderDto(
|
||||
int Id,
|
||||
string Platform,
|
||||
string PlatformUserId,
|
||||
string DisplayName,
|
||||
string Tier,
|
||||
string Strategy,
|
||||
decimal CombinedScore,
|
||||
decimal WinRate,
|
||||
decimal TotalPnl,
|
||||
int TotalTrades,
|
||||
bool IsOnWatchlist,
|
||||
bool IsSuspectedBot,
|
||||
DateTime? LastPolledAt
|
||||
);
|
||||
|
||||
public record TraderDetailDto(
|
||||
int Id,
|
||||
string Platform,
|
||||
string PlatformUserId,
|
||||
string DisplayName,
|
||||
string? Notes,
|
||||
string Tier,
|
||||
string Strategy,
|
||||
bool IsSuspectedBot,
|
||||
int? ManualPriorityOverride,
|
||||
decimal WinRate,
|
||||
decimal TotalPnl,
|
||||
int TotalTrades,
|
||||
decimal ActivityScore,
|
||||
decimal QualityScore,
|
||||
decimal VolumeScore,
|
||||
decimal TimingScore,
|
||||
decimal CombinedScore,
|
||||
int Rank,
|
||||
bool IsOnWatchlist,
|
||||
DateTime CreatedAt,
|
||||
DateTime? LastPolledAt,
|
||||
IReadOnlyList<TradeDto> RecentTrades
|
||||
);
|
||||
Reference in New Issue
Block a user