Enhance user settings management by adding new properties and updating related functionality
This commit introduces additional user settings properties, including TrendStrongAgreementThreshold, SignalAgreementThreshold, AllowSignalTrendOverride, and DefaultExchange, to the User entity and associated DTOs. The UserController and UserService are updated to handle these new settings, allowing users to customize their trading configurations more effectively. Database migrations are also included to ensure proper schema updates for the new fields.
This commit is contained in:
@@ -19,14 +19,20 @@ public class UserEntity
|
||||
public DateTimeOffset? LastConnectionDate { get; set; }
|
||||
public bool IsAdmin { get; set; }
|
||||
|
||||
// User Settings
|
||||
[Column(TypeName = "decimal(18,8)")] public decimal? LowEthAmountAlert { get; set; }
|
||||
// User Settings - Trading Configuration
|
||||
[Column(TypeName = "decimal(18,8)")] public decimal? LowEthAmountAlert { get; set; } = 1.5m; // Default: MinimumTradeEthBalanceUsd
|
||||
public bool EnableAutoswap { get; set; } = false;
|
||||
[Column(TypeName = "decimal(18,8)")] public decimal? AutoswapAmount { get; set; }
|
||||
public int? MaxWaitingTimeForPositionToGetFilledSeconds { get; set; }
|
||||
[Column(TypeName = "decimal(18,8)")] public decimal? MaxTxnGasFeePerPosition { get; set; }
|
||||
[Column(TypeName = "decimal(18,8)")] public decimal? AutoswapAmount { get; set; } = 3m; // Default: AutoSwapAmount
|
||||
public int? MaxWaitingTimeForPositionToGetFilledSeconds { get; set; } = 600; // Default: 10 minutes (600 seconds)
|
||||
[Column(TypeName = "decimal(18,8)")] public decimal? MaxTxnGasFeePerPosition { get; set; } = 1.5m; // Default: MaximumGasFeeUsd
|
||||
public bool IsGmxEnabled { get; set; } = false;
|
||||
public Confidence? MinimumConfidence { get; set; }
|
||||
|
||||
// User Settings - Indicator Combo Configuration
|
||||
public Confidence? MinimumConfidence { get; set; } = Confidence.Medium; // Default: Medium confidence for context indicators
|
||||
[Column(TypeName = "decimal(5,4)")] public decimal? TrendStrongAgreementThreshold { get; set; } = 0.66m; // Default: 66% agreement required
|
||||
[Column(TypeName = "decimal(5,4)")] public decimal? SignalAgreementThreshold { get; set; } = 0.5m; // Default: 50% agreement required
|
||||
public bool? AllowSignalTrendOverride { get; set; } = true; // Default: Allow signal strategies to override trends
|
||||
public TradingExchanges? DefaultExchange { get; set; } = TradingExchanges.GmxV2; // Default exchange
|
||||
|
||||
// Navigation properties
|
||||
public virtual ICollection<AccountEntity> Accounts { get; set; } = new List<AccountEntity>();
|
||||
|
||||
Reference in New Issue
Block a user