Skip to content

Commit

Permalink
Fix: Typo in BybitTradeApiEndpoint (#13)
Browse files Browse the repository at this point in the history
* fix: typo in BybitTradeApiEndpoint

* fix: BinanceBrokerageModel -> ByBitBrokerageModel in test
  • Loading branch information
Romazes authored Jan 5, 2024
1 parent 88394fb commit 395b16c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void ConnectionFailsIfAuthenticationFails()

var algorithm = new Mock<IAlgorithm>();
algorithm.Setup(a => a.Transactions).Returns(transactions);
algorithm.Setup(a => a.BrokerageModel).Returns(new BinanceBrokerageModel());
algorithm.Setup(a => a.BrokerageModel).Returns(new BybitBrokerageModel());
algorithm.Setup(a => a.Portfolio)
.Returns(new SecurityPortfolioManager(securities, transactions, algorithmSettings));

Expand Down Expand Up @@ -95,7 +95,7 @@ public void ConnectToUserDataStreamIfAlgorithmNotNullAndApiIsCreated()

var algorithm = new Mock<IAlgorithm>();
algorithm.Setup(a => a.Transactions).Returns(transactions);
algorithm.Setup(a => a.BrokerageModel).Returns(new BinanceBrokerageModel());
algorithm.Setup(a => a.BrokerageModel).Returns(new BybitBrokerageModel());
algorithm.Setup(a => a.Portfolio)
.Returns(new SecurityPortfolioManager(securities, transactions, algorithmSettings));

Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.BybitBrokerage/Api/BybitTradeApiEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private decimal GetTickerPrice(BybitProductCategory category, Order order)
if (ticker == null)
{
throw new KeyNotFoundException(
$"BinanceBrokerage: Unable to resolve currency conversion pair: {order.Symbol}");
$"BybitBrokerage: Unable to resolve currency conversion pair: {order.Symbol}");
}

tickerPrice = order.Direction == OrderDirection.Buy ? ticker.Ask1Price!.Value : ticker.Bid1Price!.Value;
Expand Down

0 comments on commit 395b16c

Please sign in to comment.