Skip to content

Commit

Permalink
Fix Composer map file provider fetching (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Molinero authored Mar 5, 2024
1 parent 28e7c16 commit da89efa
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions QuantConnect.RBI.Tests/RBIBrokerageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ public void CancelOrder(string ticker, decimal quantity, decimal price)

private RBIBrokerage CreateBrokerage()
{
return new RBIBrokerage(_fixConfiguration, _orderProvider, _algorithm, _job, TestGlobals.MapFileProvider,
new SecurityProvider(), false);
return new RBIBrokerage(_fixConfiguration, _orderProvider, _algorithm, _job, new SecurityProvider(), false);
}
}
}
2 changes: 1 addition & 1 deletion QuantConnect.RBI/RBIBrokerage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ public RBIBrokerage(
IOrderProvider orderProvider,
IAlgorithm algorithm,
LiveNodePacket job,
IMapFileProvider mapFileProvider,
ISecurityProvider securityProvider,
bool logFixMessages) : base("RBI")
{
_algorithm = algorithm;
_job = job;
_orderProvider = orderProvider;

var mapFileProvider = Composer.Instance.GetPart<IMapFileProvider>();
var symbolMapper = new RBISymbolMapper(mapFileProvider);

_fixBrokerageController = new FixBrokerageController();
Expand Down
2 changes: 0 additions & 2 deletions QuantConnect.RBI/RBIBrokerageFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ public override IBrokerage CreateBrokerage(LiveNodePacket job, IAlgorithm algori
algorithm.Transactions,
algorithm,
job,
Composer.Instance.GetExportedValueByTypeName<IMapFileProvider>(Config.Get("map-file-provider",
"QuantConnect.Data.Auxiliary.LocalDiskMapFileProvider")),
algorithm.Portfolio,
logFixMessages
);
Expand Down

0 comments on commit da89efa

Please sign in to comment.