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,22 @@
|
||||
using Predictalytics.Domain.Entities;
|
||||
using Predictalytics.Domain.Enums;
|
||||
|
||||
namespace Predictalytics.Domain.Interfaces;
|
||||
|
||||
public interface ITradeRepository
|
||||
{
|
||||
Task<Trade?> GetByPlatformTradeIdAsync(PlatformType platform, string platformTradeId, CancellationToken ct = default);
|
||||
Task<IReadOnlyList<Trade>> GetByTraderIdAsync(int traderId, int skip = 0, int take = 50, CancellationToken ct = default);
|
||||
/// <summary>Fast INT-based market lookup (preferred after DbMarketId backfill).</summary>
|
||||
Task<IReadOnlyList<Trade>> GetByDbMarketIdAsync(int dbMarketId, int skip = 0, int take = 50, CancellationToken ct = default);
|
||||
/// <summary>String-based fallback for trades not yet linked to a DB market.</summary>
|
||||
Task<IReadOnlyList<Trade>> GetByMarketIdAsync(string platformMarketId, int skip = 0, int take = 50, CancellationToken ct = default);
|
||||
Task<IReadOnlyList<Trade>> GetRecentAsync(int count = 50, PlatformType? platform = null, CancellationToken ct = default);
|
||||
Task<IReadOnlyList<Trade>> GetLargestAsync(int count = 5, DateTime? since = null, CancellationToken ct = default);
|
||||
Task<int> GetCountAsync(int? traderId = null, CancellationToken ct = default);
|
||||
Task AddRangeAsync(IEnumerable<Trade> trades, CancellationToken ct = default);
|
||||
Task<decimal> GetTotalVolumeAsync(DateTime? since = null, CancellationToken ct = default);
|
||||
Task<IReadOnlyList<Trade>> GetOrphanedTradesAsync(int limit, CancellationToken ct = default);
|
||||
Task<HashSet<string>> GetKnownPlatformTradeIdsAsync(PlatformType platform, int traderId, CancellationToken ct = default);
|
||||
Task UpdateAsync(Trade trade, CancellationToken ct = default);
|
||||
}
|
||||
Reference in New Issue
Block a user