From 8667ef963aa521347eca2102fb42dd384ed1bdb6 Mon Sep 17 00:00:00 2001 From: Jhonathan Abreu Date: Tue, 14 Nov 2023 15:31:33 -0400 Subject: [PATCH] TEST --- QuantConnect.BybitBrokerage/Api/BybitTradeApiEndpoint.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/QuantConnect.BybitBrokerage/Api/BybitTradeApiEndpoint.cs b/QuantConnect.BybitBrokerage/Api/BybitTradeApiEndpoint.cs index 01e9af1..c99b470 100644 --- a/QuantConnect.BybitBrokerage/Api/BybitTradeApiEndpoint.cs +++ b/QuantConnect.BybitBrokerage/Api/BybitTradeApiEndpoint.cs @@ -155,6 +155,7 @@ private ByBitPlaceOrderRequest CreateRequest(BybitProductCategory category, Orde var price = GetTickerPrice(category, order); // Spot market buy orders require price in quote currency req.Quantity *= price; + Logging.Log.Trace($"BybitTradeApiEndpoint.CreateRequest(): SPOT MARKET ORDER PRICE: {price}. SETTING NEW QUANTITY {req.Quantity}"); } break; @@ -201,6 +202,7 @@ private decimal GetTickerPrice(BybitProductCategory category, Order order) { var security = SecurityProvider.GetSecurity(order.Symbol); var tickerPrice = order.Direction == OrderDirection.Buy ? security.AskPrice : security.BidPrice; + Logging.Log.Trace($"BybitTradeApiEndpoint.GetTickerPrice(): GETTING TICKER PRICE FOR {order.Symbol}: {tickerPrice}"); if (tickerPrice == 0) { var brokerageSymbol = SymbolMapper.GetBrokerageSymbol(order.Symbol); @@ -212,6 +214,7 @@ private decimal GetTickerPrice(BybitProductCategory category, Order order) } tickerPrice = order.Direction == OrderDirection.Buy ? ticker.Ask1Price!.Value : ticker.Bid1Price!.Value; + Logging.Log.Trace($"BybitTradeApiEndpoint.GetTickerPrice(): GETTING TICKER PRICE FROM MARKET API CLIENT FOR {order.Symbol}: {tickerPrice}"); } return tickerPrice;