private void OrderFilledHandler(OrderFilledData data)
        {
            TraderInfo traderInfo = TraderStatistic.Find(x => x.Symbol.Equals(data.Symbol));

            if (traderInfo != null)
            {
                traderInfo.Update(data);
                TraderInfoChanged?.Invoke(traderInfo);
            }

            // Code below is usefull?
            List <Trade> updatedPositions = new List <Trade>();
            List <Trade> allTrades        = new List <Trade>();

            foreach (Trade trade in data.Trades)
            {
                trade.Symbol = data.Symbol;
                updatedPositions.Add(trade);
            }

            foreach (Trade trade in data.RawTrades)
            {
                trade.Symbol = data.Symbol;
                allTrades.Add(trade);
            }
            NewTrades?.Invoke(updatedPositions, allTrades);

            _receiver.OrderFilledHandle(data);
        }
        private void LeverageHandler(LeverageData data)
        {
            TraderInfo traderInfo = TraderStatistic.Find(x => x.Symbol.Equals(data.Symbol));

            if (traderInfo != null)
            {
                traderInfo.Update(data);
                _receiver.UpdateOrders(data.Orders);
            }
        }
        private void TraderBalanceHandler(TraderBalanceData data)
        {
            TraderInfo traderInfo = TraderStatistic.Find(x => x.Symbol.Equals(data.Symbol));

            if (traderInfo != null)
            {
                traderInfo.Update(data);
                TraderInfoChanged?.Invoke(traderInfo);
            }
        }
        private void OrderStatusHandler(OrderStatusData data)
        {
            TraderInfo traderInfo = TraderStatistic.Find(x => x.Symbol.Equals(data.Symbol));

            if (traderInfo != null)
            {
                traderInfo.Update(data);
                TraderInfoChanged?.Invoke(traderInfo);
            }
            _receiver.OrderStatusHandle(data);
        }
        private void OrderCanceledHandler(OrderCanceledData data)
        {
            TraderInfo traderInfo = TraderStatistic.Find(x => x.Symbol.Equals(data.Symbol));

            if (traderInfo != null)
            {
                traderInfo.Update(data);
                TraderInfoChanged?.Invoke(traderInfo);
            }
            _receiver.OrderCanceledHandle(data);

            if (data.Status == OrderStatus.Rejected)
            {
                OrderCancelError?.Invoke(data);
            }
        }
        private void FundingHandler(FundingData data)
        {
            TraderInfo traderInfo = TraderStatistic.Find(x => x.Symbol.Equals(data.Symbol));

            if (traderInfo != null)
            {
                traderInfo.Update(data);
                TraderInfoChanged?.Invoke(traderInfo);
            }

            // Code below is usefull?
            List <Trade> allTrades = new List <Trade>();

            foreach (Trade trade in data.Trades)
            {
                trade.Symbol = data.Symbol; allTrades.Add(trade);
            }
            NewTrades?.Invoke(new List <Trade>(), allTrades);
        }