using Managing.Domain.Trades;
using MediatR;

namespace Managing.Application.Trading.Commands
{
    public class ClosePositionCommand : IRequest<Position>
    {
        public ClosePositionCommand(Position position, int accountId, decimal? executionPrice = null, bool isForBacktest = false)
        {
            Position = position;
            AccountId = accountId;
            ExecutionPrice = executionPrice;
            IsForBacktest = isForBacktest;
        }

        public Position Position { get; }
        public int AccountId { get; }
        public decimal? ExecutionPrice { get; set; }
        public bool IsForBacktest { get; set; }
    }
}