docker files fixes from liaqat
This commit is contained in:
66
src/Managing.Application/Shared/MessengerService.cs
Normal file
66
src/Managing.Application/Shared/MessengerService.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using Managing.Application.Abstractions.Services;
|
||||
using Managing.Common;
|
||||
using Managing.Domain.Statistics;
|
||||
using Managing.Domain.Trades;
|
||||
|
||||
namespace Managing.Application.Shared;
|
||||
|
||||
public class MessengerService : IMessengerService
|
||||
{
|
||||
private readonly IDiscordService _discordService;
|
||||
|
||||
public MessengerService(IDiscordService discordService)
|
||||
{
|
||||
_discordService = discordService;
|
||||
}
|
||||
|
||||
public async Task SendClosedPosition(string address, Trade oldTrade)
|
||||
{
|
||||
await _discordService.SendClosedPosition(address, oldTrade);
|
||||
}
|
||||
|
||||
public async Task SendClosingPosition(Position position)
|
||||
{
|
||||
await _discordService.SendClosingPosition(position);
|
||||
}
|
||||
|
||||
public async Task SendIncreasePosition(string address, Trade trade, string copyAccountName, Trade? oldTrade = null)
|
||||
{
|
||||
await _discordService.SendIncreasePosition(address, trade, copyAccountName, oldTrade);
|
||||
}
|
||||
|
||||
public async Task SendDecreasePosition(string address, Trade newTrade, decimal decreaseAmount)
|
||||
{
|
||||
await _discordService.SendDecreasePosition(address, newTrade, decreaseAmount);
|
||||
}
|
||||
|
||||
public async Task SendMessage(string message)
|
||||
{
|
||||
await _discordService.SendMessage(message);
|
||||
}
|
||||
|
||||
public async Task SendPosition(Position position)
|
||||
{
|
||||
await _discordService.SendPosition(position);
|
||||
}
|
||||
|
||||
public async Task SendSignal(string message, Enums.TradingExchanges exchange, Enums.Ticker ticker, Enums.TradeDirection direction, Enums.Timeframe timeframe)
|
||||
{
|
||||
await _discordService.SendSignal(message, exchange, ticker, direction, timeframe);
|
||||
}
|
||||
|
||||
public async Task SendTradeMessage(string message, bool isBadBehavior = false)
|
||||
{
|
||||
await _discordService.SendTradeMessage(message, isBadBehavior);
|
||||
}
|
||||
|
||||
public async Task SendBestTraders(List<Trader> traders)
|
||||
{
|
||||
await _discordService.SendBestTraders(traders);
|
||||
}
|
||||
|
||||
public async Task SendBadTraders(List<Trader> traders)
|
||||
{
|
||||
await _discordService.SendBadTraders(traders);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user