Skip to content

Commit 831f12f

Browse files
Remove unused Quantity property in TradeEntry and update EmitTradeTick to use Size as it's always non-negative. (#10)
1 parent 62f2239 commit 831f12f

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

QuantConnect.dYdXBrokerage/Models/TradeEntry.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ public class TradeEntry
2424
public OrderDirection Side { get; set; }
2525
public decimal Price { get; set; }
2626
public string CreatedAt { get; set; }
27-
public decimal Quantity => Side == OrderDirection.Buy ? Size : -Size;
2827
}

QuantConnect.dYdXBrokerage/dYdXBrokerage.Messaging.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,10 @@ private void HandleTrades(JObject jObj)
245245
var symbol = _symbolMapper.GetLeanSymbol(trades.Id, SecurityType.CryptoFuture, MarketName);
246246
foreach (var trade in trades.Contents.Trades)
247247
{
248-
// var tradeValue = trade.Side == OrderSide.Buy ? trade.Value : trade.Value * -1;
249248
EmitTradeTick(symbol,
250249
Time.ParseDate(trade.CreatedAt),
251250
trade.Price,
252-
trade.Quantity);
251+
trade.Size);
253252
}
254253
}
255254

0 commit comments

Comments
 (0)