Exemplo n.º 1
0
        private ExchangeOrderRequest GetExchangeOrderRequest(bool isBuyOrder, IExchangeAPI api)
        {
            var exchangeOrderRequest = new ExchangeOrderRequest
            {
                Amount            = Amount,
                Price             = Price,
                IsBuy             = isBuyOrder,
                IsMargin          = IsMargin,
                MarketSymbol      = api.NormalizeMarketSymbol(MarketSymbol),
                OrderType         = OrderType,
                StopPrice         = StopPrice,
                ShouldRoundAmount = ShouldRoundAmount
            };

            Amount = exchangeOrderRequest.RoundAmount();

            return(exchangeOrderRequest);
        }