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:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user