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:
@@ -165,7 +165,11 @@ public class UserController : BaseController
|
||||
MaxWaitingTimeForPositionToGetFilledSeconds = settings.MaxWaitingTimeForPositionToGetFilledSeconds,
|
||||
MaxTxnGasFeePerPosition = settings.MaxTxnGasFeePerPosition,
|
||||
IsGmxEnabled = settings.IsGmxEnabled,
|
||||
MinimumConfidence = settings.MinimumConfidence
|
||||
MinimumConfidence = settings.MinimumConfidence,
|
||||
TrendStrongAgreementThreshold = settings.TrendStrongAgreementThreshold,
|
||||
SignalAgreementThreshold = settings.SignalAgreementThreshold,
|
||||
AllowSignalTrendOverride = settings.AllowSignalTrendOverride,
|
||||
DefaultExchange = settings.DefaultExchange
|
||||
};
|
||||
var updatedUser = await _userService.UpdateUserSettings(user, settingsDto);
|
||||
return Ok(updatedUser);
|
||||
|
||||
@@ -5,12 +5,19 @@ namespace Managing.Api.Models.Requests;
|
||||
|
||||
public class UpdateUserSettingsRequest
|
||||
{
|
||||
// Trading Configuration
|
||||
public decimal? LowEthAmountAlert { get; set; }
|
||||
public bool? EnableAutoswap { get; set; }
|
||||
public decimal? AutoswapAmount { get; set; }
|
||||
public int? MaxWaitingTimeForPositionToGetFilledSeconds { get; set; }
|
||||
public decimal? MaxTxnGasFeePerPosition { get; set; }
|
||||
public bool? IsGmxEnabled { get; set; }
|
||||
|
||||
// Indicator Combo Configuration
|
||||
public Confidence? MinimumConfidence { get; set; }
|
||||
public decimal? TrendStrongAgreementThreshold { get; set; }
|
||||
public decimal? SignalAgreementThreshold { get; set; }
|
||||
public bool? AllowSignalTrendOverride { get; set; }
|
||||
public TradingExchanges? DefaultExchange { get; set; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user