Refactor user settings management to remove IsGmxEnabled and DefaultExchange from updatable fields, introducing GmxSlippage instead. Update UserController, UserService, and related DTOs to reflect these changes, ensuring proper handling of user settings. Adjust database schema and migrations to accommodate the new GmxSlippage property, enhancing user customization options for trading configurations.

This commit is contained in:
2025-12-30 07:19:08 +07:00
parent aa3b06bbe4
commit 21d87efeee
23 changed files with 1908 additions and 32 deletions

View File

@@ -35,7 +35,8 @@ namespace Managing.Infrastructure.Exchanges.Exchanges
DateTime? currentDate = null,
bool ioc = true,
decimal? stopLossPrice = null,
decimal? takeProfitPrice = null);
decimal? takeProfitPrice = null,
decimal? allowedSlippage = null);
public abstract Orderbook GetOrderbook(Account account, Ticker ticker);
public abstract Task<List<Balance>> GetBalances(Account account, bool isForPaperTrading = false);
public abstract Task<List<Trade>> GetOrders(Account account, Ticker ticker);

View File

@@ -174,7 +174,8 @@ public class EvmProcessor : BaseProcessor
DateTime? currentDate = null,
bool ioc = true,
decimal? stopLossPrice = null,
decimal? takeProfitPrice = null)
decimal? takeProfitPrice = null,
decimal? allowedSlippage = null)
{
Trade trade;
if (reduceOnly)
@@ -197,7 +198,7 @@ public class EvmProcessor : BaseProcessor
else
{
trade = await _evmManager.IncreasePosition(account, ticker, direction, price, quantity, leverage,
stopLossPrice, takeProfitPrice);
stopLossPrice, takeProfitPrice, allowedSlippage);
}
return trade;