From 7cb2cf308aa6ca969fdc9300e4fef6aa937623db Mon Sep 17 00:00:00 2001 From: fabo <61707860+fabiankliem@users.noreply.github.com> Date: Tue, 3 Feb 2026 19:36:26 +0400 Subject: [PATCH 1/5] Add IG Markets brokerage support to LEAN - Add IGBrokerageModel with support for Forex, CFD, Crypto, Index, Equity - Add IG market constant to Market.cs - Add IG configuration entries to Launcher/config.json - Configure zero fee model (fees built into spread) - Support Market, Limit, StopMarket, StopLimit order types --- Common/Brokerages/IGBrokerageModel.cs | 193 ++++++++++++++++++++++++++ Common/Market.cs | 5 + Launcher/config.json | 23 +++ 3 files changed, 221 insertions(+) create mode 100644 Common/Brokerages/IGBrokerageModel.cs diff --git a/Common/Brokerages/IGBrokerageModel.cs b/Common/Brokerages/IGBrokerageModel.cs new file mode 100644 index 000000000000..4d807e64280b --- /dev/null +++ b/Common/Brokerages/IGBrokerageModel.cs @@ -0,0 +1,193 @@ +/* + * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. + * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +using System; +using System.Collections.Generic; +using QuantConnect.Benchmarks; +using QuantConnect.Orders; +using QuantConnect.Orders.Fees; +using QuantConnect.Orders.Fills; +using QuantConnect.Orders.Slippage; +using QuantConnect.Securities; +using QuantConnect.Util; + +namespace QuantConnect.Brokerages +{ + /// + /// Provides IG Markets brokerage model specific properties and methods + /// + /// + /// IG Markets supports trading in Forex, Indices, Commodities, Crypto, and Share CFDs. + /// This model configures the appropriate fee models, fill models, and order validation + /// for IG Markets trading. + /// + public class IGBrokerageModel : DefaultBrokerageModel + { + /// + /// The default markets for IG brokerage + /// + public new static readonly IReadOnlyDictionary DefaultMarketMap = new Dictionary + { + { SecurityType.Forex, Market.IG }, + { SecurityType.Cfd, Market.IG }, + { SecurityType.Crypto, Market.IG }, + { SecurityType.Index, Market.IG }, + { SecurityType.Equity, Market.IG } + }.ToReadOnlyDictionary(); + + /// + /// Gets a map of the default markets to be used for each security type + /// + public override IReadOnlyDictionary DefaultMarkets => DefaultMarketMap; + + /// + /// Initializes a new instance of the class + /// + /// The type of account to be modelled, defaults to Margin + public IGBrokerageModel(AccountType accountType = AccountType.Margin) + : base(accountType) + { + } + + /// + /// Returns true if the brokerage could accept this order. + /// + /// The security being ordered + /// The order to be processed + /// If this function returns false, a brokerage message detailing why the order may not be submitted + /// True if the brokerage could accept the order, false otherwise + public override bool CanSubmitOrder(Security security, Order order, out BrokerageMessageEvent message) + { + message = null; + + // Validate security type + if (!IsSecurityTypeSupported(security.Type)) + { + message = new BrokerageMessageEvent( + BrokerageMessageType.Warning, + "UnsupportedSecurityType", + $"IG does not support {security.Type} security type." + ); + return false; + } + + // Validate order type + if (!IsOrderTypeSupported(order.Type)) + { + message = new BrokerageMessageEvent( + BrokerageMessageType.Warning, + "UnsupportedOrderType", + $"IG does not support {order.Type} order type." + ); + return false; + } + + return base.CanSubmitOrder(security, order, out message); + } + + /// + /// Returns true if the brokerage would allow updating the order as specified by the request + /// + /// The security of the order + /// The order to be updated + /// The requested update to be made to the order + /// If this function returns false, a brokerage message detailing why the order may not be updated + /// True if the brokerage would allow updating the order, false otherwise + public override bool CanUpdateOrder(Security security, Order order, UpdateOrderRequest request, out BrokerageMessageEvent message) + { + message = null; + + // IG supports updating working orders (limit, stop) + if (order.Type == OrderType.Market) + { + message = new BrokerageMessageEvent( + BrokerageMessageType.Warning, + "OrderUpdateNotSupported", + "IG does not support updating market orders." + ); + return false; + } + + return base.CanUpdateOrder(security, order, request, out message); + } + + /// + /// Gets a new fill model for the specified security + /// + /// The security to get fill model for + /// The fill model for this brokerage + public override IFillModel GetFillModel(Security security) + { + return new ImmediateFillModel(); + } + + /// + /// Gets the fee model for the specified security + /// + /// The security to get fee model for + /// The fee model for this brokerage + public override IFeeModel GetFeeModel(Security security) + { + // IG typically charges via spread, not commission + // Return a zero fee model since fees are built into spread + return new ConstantFeeModel(0m); + } + + /// + /// Gets the slippage model for the specified security + /// + /// The security to get slippage model for + /// The slippage model for this brokerage + public override ISlippageModel GetSlippageModel(Security security) + { + return new ConstantSlippageModel(0m); + } + + /// + /// Gets the benchmark for the specified algorithm + /// + /// The securities for the benchmark + /// The benchmark for this brokerage + public override IBenchmark GetBenchmark(SecurityManager securities) + { + // Use SPY as default benchmark + var symbol = Symbol.Create("SPY", SecurityType.Equity, Market.USA); + return SecurityBenchmark.CreateInstance(securities, symbol); + } + + /// + /// Determines if the specified security type is supported by IG + /// + private static bool IsSecurityTypeSupported(SecurityType securityType) + { + return securityType == SecurityType.Forex || + securityType == SecurityType.Cfd || + securityType == SecurityType.Crypto || + securityType == SecurityType.Index || + securityType == SecurityType.Equity; + } + + /// + /// Determines if the specified order type is supported by IG + /// + private static bool IsOrderTypeSupported(OrderType orderType) + { + return orderType == OrderType.Market || + orderType == OrderType.Limit || + orderType == OrderType.StopMarket || + orderType == OrderType.StopLimit; + } + } +} diff --git a/Common/Market.cs b/Common/Market.cs index e4745023ce2f..d0fae94b6d9a 100644 --- a/Common/Market.cs +++ b/Common/Market.cs @@ -104,6 +104,11 @@ static Market() /// public const string Dukascopy = "dukascopy"; + /// + /// IG Markets + /// + public const string IG = "ig"; + /// /// Bitfinex market /// diff --git a/Launcher/config.json b/Launcher/config.json index 4008a5bd9e41..9ffabcb873a9 100644 --- a/Launcher/config.json +++ b/Launcher/config.json @@ -123,6 +123,14 @@ "fxcm-password": "", "fxcm-account-id": "", + // ig markets configuration + "ig-environment": "demo", // "demo" or "live" + "ig-api-url": "", // Leave empty to use default based on environment + "ig-identifier": "", + "ig-password": "", + "ig-api-key": "", + "ig-account-id": "", + // iqfeed configuration "iqfeed-host": "127.0.0.1", "iqfeed-username": "", @@ -459,6 +467,21 @@ "history-provider": [ "BrokerageHistoryProvider", "SubscriptionDataReaderHistoryProvider" ] }, + // defines the 'live-ig' environment + "live-ig": { + "live-mode": true, + + // IG Markets brokerage implementation + "live-mode-brokerage": "IGBrokerage", + "data-queue-handler": [ "IGBrokerage" ], + "setup-handler": "QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler", + "result-handler": "QuantConnect.Lean.Engine.Results.LiveTradingResultHandler", + "data-feed-handler": "QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed", + "real-time-handler": "QuantConnect.Lean.Engine.RealTime.LiveTradingRealTimeHandler", + "transaction-handler": "QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler", + "history-provider": [ "BrokerageHistoryProvider", "SubscriptionDataReaderHistoryProvider" ] + }, + // defines the 'live-oanda' environment "live-oanda": { "live-mode": true, From e78a022e3937a6bc6cb95d456f6d0a79d6932506 Mon Sep 17 00:00:00 2001 From: fabo <61707860+fabiankliem@users.noreply.github.com> Date: Tue, 3 Feb 2026 21:18:48 +0400 Subject: [PATCH 2/5] Change TargetFramework to net6.0 for compatibility Update all project files to target .NET 6.0 instead of net10.0. This change addresses SDK compatibility while the codebase uses C# 12 features. Note: Building requires .NET 8+ SDK due to C# 12 syntax in Compression.cs. The net6.0 target is for runtime compatibility. --- Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj | 2 +- Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj | 2 +- Algorithm.Python/QuantConnect.Algorithm.Python.csproj | 2 +- Algorithm/QuantConnect.Algorithm.csproj | 2 +- AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj | 2 +- Api/QuantConnect.Api.csproj | 2 +- Brokerages/QuantConnect.Brokerages.csproj | 2 +- Common/QuantConnect.csproj | 2 +- Compression/QuantConnect.Compression.csproj | 2 +- Configuration/QuantConnect.Configuration.csproj | 2 +- .../QuantConnect.DownloaderDataProvider.Launcher.csproj | 2 +- Engine/QuantConnect.Lean.Engine.csproj | 2 +- Indicators/QuantConnect.Indicators.csproj | 2 +- Launcher/QuantConnect.Lean.Launcher.csproj | 2 +- Logging/QuantConnect.Logging.csproj | 2 +- Messaging/QuantConnect.Messaging.csproj | 2 +- Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj | 2 +- Optimizer/QuantConnect.Optimizer.csproj | 2 +- Queues/QuantConnect.Queues.csproj | 2 +- Report/QuantConnect.Report.csproj | 2 +- Research/QuantConnect.Research.csproj | 2 +- Tests/QuantConnect.Tests.csproj | 2 +- ToolBox/QuantConnect.ToolBox.csproj | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj b/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj index 318f77c54be4..130ef0873797 100644 --- a/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj +++ b/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Algorithm.CSharp QuantConnect.Algorithm.CSharp - net10.0 + net6.0 false bin\$(Configuration)\ AllEnabledByDefault diff --git a/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj b/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj index 1cd1d678d750..0c3f16004395 100644 --- a/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj +++ b/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Algorithm.Framework QuantConnect.Algorithm.Framework - net10.0 + net6.0 false bin\$(Configuration)\ AllEnabledByDefault diff --git a/Algorithm.Python/QuantConnect.Algorithm.Python.csproj b/Algorithm.Python/QuantConnect.Algorithm.Python.csproj index 28a7eb1304fc..337fcde9abb1 100644 --- a/Algorithm.Python/QuantConnect.Algorithm.Python.csproj +++ b/Algorithm.Python/QuantConnect.Algorithm.Python.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Algorithm.Python QuantConnect.Algorithm.Python - net10.0 + net6.0 AllEnabledByDefault bin\$(Configuration)\ false diff --git a/Algorithm/QuantConnect.Algorithm.csproj b/Algorithm/QuantConnect.Algorithm.csproj index 2408b10fbce1..6c2faa60c1a0 100644 --- a/Algorithm/QuantConnect.Algorithm.csproj +++ b/Algorithm/QuantConnect.Algorithm.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Algorithm QuantConnect.Algorithm - net10.0 + net6.0 ..\ false AllEnabledByDefault diff --git a/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj b/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj index ac91612d6dba..64a98ae80634 100644 --- a/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj +++ b/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.AlgorithmFactory QuantConnect.AlgorithmFactory - net10.0 + net6.0 false bin\$(Configuration)\ AllEnabledByDefault diff --git a/Api/QuantConnect.Api.csproj b/Api/QuantConnect.Api.csproj index 4c06a2e5213e..1260d9e42069 100644 --- a/Api/QuantConnect.Api.csproj +++ b/Api/QuantConnect.Api.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Api QuantConnect.Api - net10.0 + net6.0 ..\ true AllEnabledByDefault diff --git a/Brokerages/QuantConnect.Brokerages.csproj b/Brokerages/QuantConnect.Brokerages.csproj index e44042df0a51..b95a054f94a2 100644 --- a/Brokerages/QuantConnect.Brokerages.csproj +++ b/Brokerages/QuantConnect.Brokerages.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Brokerages QuantConnect.Brokerages - net10.0 + net6.0 AllEnabledByDefault false bin\$(Configuration)\ diff --git a/Common/QuantConnect.csproj b/Common/QuantConnect.csproj index e39b3a918c5f..5d74ddf7d852 100644 --- a/Common/QuantConnect.csproj +++ b/Common/QuantConnect.csproj @@ -2,7 +2,7 @@ Debug AnyCPU - net10.0 + net6.0 QuantConnect.Common ..\ true diff --git a/Compression/QuantConnect.Compression.csproj b/Compression/QuantConnect.Compression.csproj index 66a19b888f51..b121078fa105 100644 --- a/Compression/QuantConnect.Compression.csproj +++ b/Compression/QuantConnect.Compression.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Compression QuantConnect.Compression - net10.0 + net6.0 AllEnabledByDefault false bin\$(Configuration)\ diff --git a/Configuration/QuantConnect.Configuration.csproj b/Configuration/QuantConnect.Configuration.csproj index e2b797aee2b4..aaeea5886f2b 100644 --- a/Configuration/QuantConnect.Configuration.csproj +++ b/Configuration/QuantConnect.Configuration.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Configuration QuantConnect.Configuration - net10.0 + net6.0 ..\ true AllEnabledByDefault diff --git a/DownloaderDataProvider/QuantConnect.DownloaderDataProvider.Launcher.csproj b/DownloaderDataProvider/QuantConnect.DownloaderDataProvider.Launcher.csproj index 7e8ae152ec8a..710c5ae91611 100644 --- a/DownloaderDataProvider/QuantConnect.DownloaderDataProvider.Launcher.csproj +++ b/DownloaderDataProvider/QuantConnect.DownloaderDataProvider.Launcher.csproj @@ -6,7 +6,7 @@ Exe QuantConnect.DownloaderDataProvider.Launcher QuantConnect.DownloaderDataProvider.Launcher - net10.0 + net6.0 AllEnabledByDefault false bin\$(Configuration)\ diff --git a/Engine/QuantConnect.Lean.Engine.csproj b/Engine/QuantConnect.Lean.Engine.csproj index 5163599312dc..2a0c0e2455e6 100644 --- a/Engine/QuantConnect.Lean.Engine.csproj +++ b/Engine/QuantConnect.Lean.Engine.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Lean.Engine QuantConnect.Lean.Engine - net10.0 + net6.0 ..\ true publish\ diff --git a/Indicators/QuantConnect.Indicators.csproj b/Indicators/QuantConnect.Indicators.csproj index 6ad6bc016291..f102c018f516 100644 --- a/Indicators/QuantConnect.Indicators.csproj +++ b/Indicators/QuantConnect.Indicators.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Indicators QuantConnect.Indicators - net10.0 + net6.0 AllEnabledByDefault false bin\$(Configuration)\ diff --git a/Launcher/QuantConnect.Lean.Launcher.csproj b/Launcher/QuantConnect.Lean.Launcher.csproj index dfea79a8e24c..d300d6e06218 100644 --- a/Launcher/QuantConnect.Lean.Launcher.csproj +++ b/Launcher/QuantConnect.Lean.Launcher.csproj @@ -5,7 +5,7 @@ Exe QuantConnect.Lean.Launcher QuantConnect.Lean.Launcher - net10.0 + net6.0 AllEnabledByDefault false bin\$(Configuration)\ diff --git a/Logging/QuantConnect.Logging.csproj b/Logging/QuantConnect.Logging.csproj index 4040ff227d09..4b4a7e6fa0d2 100644 --- a/Logging/QuantConnect.Logging.csproj +++ b/Logging/QuantConnect.Logging.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Logging QuantConnect.Logging - net10.0 + net6.0 ..\ true AllEnabledByDefault diff --git a/Messaging/QuantConnect.Messaging.csproj b/Messaging/QuantConnect.Messaging.csproj index 5a4cee268b08..2f2ee0a012b8 100644 --- a/Messaging/QuantConnect.Messaging.csproj +++ b/Messaging/QuantConnect.Messaging.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Messaging QuantConnect.Messaging - net10.0 + net6.0 AllEnabledByDefault false bin\$(Configuration)\ diff --git a/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj b/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj index e9661b733e81..37b602f47ae1 100644 --- a/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj +++ b/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj @@ -5,7 +5,7 @@ Exe QuantConnect.Optimizer.Launcher QuantConnect.Optimizer.Launcher - net10.0 + net6.0 false bin\$(Configuration)\ AllEnabledByDefault diff --git a/Optimizer/QuantConnect.Optimizer.csproj b/Optimizer/QuantConnect.Optimizer.csproj index 552252fde267..0edb5f53540d 100644 --- a/Optimizer/QuantConnect.Optimizer.csproj +++ b/Optimizer/QuantConnect.Optimizer.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Optimizer QuantConnect.Optimizer - net10.0 + net6.0 false bin\$(Configuration)\ AllEnabledByDefault diff --git a/Queues/QuantConnect.Queues.csproj b/Queues/QuantConnect.Queues.csproj index 7a24256fe9d7..012cfad65120 100644 --- a/Queues/QuantConnect.Queues.csproj +++ b/Queues/QuantConnect.Queues.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Queues QuantConnect.Queues - net10.0 + net6.0 false bin\$(Configuration)\ bin\$(Configuration)\QuantConnect.Queues.xml diff --git a/Report/QuantConnect.Report.csproj b/Report/QuantConnect.Report.csproj index 706e7866e6fe..853c2063d6bf 100644 --- a/Report/QuantConnect.Report.csproj +++ b/Report/QuantConnect.Report.csproj @@ -5,7 +5,7 @@ Exe QuantConnect.Report QuantConnect.Report - net10.0 + net6.0 false bin\$(Configuration)\ bin\$(Configuration)\QuantConnect.Report.xml diff --git a/Research/QuantConnect.Research.csproj b/Research/QuantConnect.Research.csproj index 08eea2a55bdb..99c2f5b2702c 100644 --- a/Research/QuantConnect.Research.csproj +++ b/Research/QuantConnect.Research.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Research QuantConnect.Research - net10.0 + net6.0 AllEnabledByDefault bin\$(Configuration)\ false diff --git a/Tests/QuantConnect.Tests.csproj b/Tests/QuantConnect.Tests.csproj index 9ec36875f36a..1ac4701ffdb4 100644 --- a/Tests/QuantConnect.Tests.csproj +++ b/Tests/QuantConnect.Tests.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Tests QuantConnect.Tests - net10.0 + net6.0 ..\ AllEnabledByDefault false diff --git a/ToolBox/QuantConnect.ToolBox.csproj b/ToolBox/QuantConnect.ToolBox.csproj index 196fe98c86f9..33811e2da899 100644 --- a/ToolBox/QuantConnect.ToolBox.csproj +++ b/ToolBox/QuantConnect.ToolBox.csproj @@ -5,7 +5,7 @@ Exe QuantConnect.ToolBox QuantConnect.ToolBox - net10.0 + net6.0 AllEnabledByDefault false bin\$(Configuration)\ From fb383afa336d128e76cda0d616db218aee8f1c88 Mon Sep 17 00:00:00 2001 From: fabo <61707860+fabiankliem@users.noreply.github.com> Date: Wed, 4 Feb 2026 10:18:03 +0400 Subject: [PATCH 3/5] Add IG Markets brokerage integration to Lean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add IGFeeModel implementing IG Markets fee structure * Forex/Crypto: Zero commission (spread-based) * Index/CFD/Equity: 0.1% commission with £10 GBP minimum - Update IGBrokerageModel to use IGFeeModel instead of ConstantFeeModel - Add IG to BrokerageName enum for transaction and execution rules This completes the Lean engine integration for the IG Markets brokerage. --- Common/Brokerages/BrokerageName.cs | 7 +- Common/Brokerages/IGBrokerageModel.cs | 4 +- Common/Orders/Fees/IGFeeModel.cs | 117 ++++++++++++++++++++++++++ 3 files changed, 124 insertions(+), 4 deletions(-) create mode 100644 Common/Orders/Fees/IGFeeModel.cs diff --git a/Common/Brokerages/BrokerageName.cs b/Common/Brokerages/BrokerageName.cs index 7f6edaab7a5e..66f40f65f358 100644 --- a/Common/Brokerages/BrokerageName.cs +++ b/Common/Brokerages/BrokerageName.cs @@ -197,6 +197,11 @@ public enum BrokerageName /// /// Transaction and submit/execution rules will use dYdX models /// - DYDX + DYDX, + + /// + /// Transaction and submit/execution rules will use IG Markets models + /// + IG } } diff --git a/Common/Brokerages/IGBrokerageModel.cs b/Common/Brokerages/IGBrokerageModel.cs index 4d807e64280b..42d30e6e2e80 100644 --- a/Common/Brokerages/IGBrokerageModel.cs +++ b/Common/Brokerages/IGBrokerageModel.cs @@ -140,9 +140,7 @@ public override IFillModel GetFillModel(Security security) /// The fee model for this brokerage public override IFeeModel GetFeeModel(Security security) { - // IG typically charges via spread, not commission - // Return a zero fee model since fees are built into spread - return new ConstantFeeModel(0m); + return new IGFeeModel(); } /// diff --git a/Common/Orders/Fees/IGFeeModel.cs b/Common/Orders/Fees/IGFeeModel.cs new file mode 100644 index 000000000000..bfe2bd8a46bd --- /dev/null +++ b/Common/Orders/Fees/IGFeeModel.cs @@ -0,0 +1,117 @@ +/* + * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. + * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +using System; +using QuantConnect.Securities; + +namespace QuantConnect.Orders.Fees +{ + /// + /// Provides an implementation of that models IG Markets order fees + /// + /// + /// IG Markets Fee Structure: + /// - Forex: Spread-based pricing (no commission) + /// - CFD/Index/Equity: 0.1% commission with £10 minimum + /// - Crypto: Spread-based pricing (no commission) + /// + /// Note: Fees are charged in GBP regardless of the traded instrument currency + /// + public class IGFeeModel : FeeModel + { + private const decimal CommissionRate = 0.001m; // 0.1% + private const decimal MinimumCommission = 10m; // £10 GBP + private const string FeeCurrency = "GBP"; + + /// + /// Get the fee for this order in units of the account currency + /// + /// A object + /// containing the security and order + /// The cost of the order in units of the account currency + public override OrderFee GetOrderFee(OrderFeeParameters parameters) + { + if (parameters?.Order == null || parameters.Security == null) + { + return OrderFee.Zero; + } + + var order = parameters.Order; + var security = parameters.Security; + + // Calculate absolute order value + var fillPrice = order.Price; + var fillQuantity = order.AbsoluteQuantity; + var orderValue = Math.Abs(fillPrice * fillQuantity); + + decimal feeAmount = 0m; + + switch (security.Type) + { + case SecurityType.Forex: + // Forex: Spread-based pricing, no commission + // The spread cost is already included in the execution price + return OrderFee.Zero; + + case SecurityType.Index: + case SecurityType.Cfd: + // Index/CFD: 0.1% commission with £10 minimum + feeAmount = CalculateCommissionFee(orderValue); + break; + + case SecurityType.Equity: + // Equity: 0.1% commission with £10 minimum + feeAmount = CalculateCommissionFee(orderValue); + break; + + case SecurityType.Crypto: + // Crypto: Spread-based pricing, no commission + return OrderFee.Zero; + + case SecurityType.Future: + case SecurityType.Option: + case SecurityType.FutureOption: + case SecurityType.IndexOption: + // Not currently supported + return OrderFee.Zero; + + default: + // Unknown security type, return zero + return OrderFee.Zero; + } + + return new OrderFee(new CashAmount(feeAmount, FeeCurrency)); + } + + /// + /// Calculate commission-based fee (0.1% with £10 minimum) + /// + /// The absolute order value + /// Fee amount in GBP + private static decimal CalculateCommissionFee(decimal orderValue) + { + if (orderValue <= 0) + { + return 0m; + } + + // Calculate 0.1% commission + var commission = orderValue * CommissionRate; + + // Apply minimum commission of £10 + return Math.Max(commission, MinimumCommission); + } + } +} From 467459415686e59c2d3345d1c358b51534f378a9 Mon Sep 17 00:00:00 2001 From: fabo <61707860+fabiankliem@users.noreply.github.com> Date: Fri, 6 Feb 2026 14:26:41 +0400 Subject: [PATCH 4/5] Revert net6.0 downgrade and add IG Markets brokerage integration to LEAN Revert all 23 .csproj files from net6.0 back to net10.0, undoing the temporary framework downgrade (e78a022e3). The IG brokerage plugin and all LEAN projects now target .NET 10. IG Markets integration changes: - Register IG market (ID 43) in Market.cs with HardcodedMarkets entry - Add BrokerageName.IG enum value and IGBrokerageModel to IBrokerageModel - Add IG market hours and symbol properties to data databases - Add live-ig environment and IG configuration keys to Launcher config.json - Add IGLiveTestAlgorithm for live trading validation Verified: LEAN builds with 0 errors on .NET 10, IG brokerage composes via MEF, live test confirms Lightstreamer streaming, market data, and trade execution all working. --- Algorithm.CSharp/IGLiveTestAlgorithm.cs | 61 +++++ .../QuantConnect.Algorithm.CSharp.csproj | 2 +- .../QuantConnect.Algorithm.Framework.csproj | 2 +- .../QuantConnect.Algorithm.Python.csproj | 2 +- Algorithm/QuantConnect.Algorithm.csproj | 2 +- .../QuantConnect.AlgorithmFactory.csproj | 2 +- Api/QuantConnect.Api.csproj | 2 +- Brokerages/QuantConnect.Brokerages.csproj | 2 +- Common/Brokerages/IBrokerageModel.cs | 3 + Common/Market.cs | 3 +- Common/QuantConnect.csproj | 2 +- Compression/QuantConnect.Compression.csproj | 2 +- .../QuantConnect.Configuration.csproj | 2 +- Data/market-hours/market-hours-database.json | 258 +++++++++++++++++- .../symbol-properties-database.csv | 31 ++- ...ect.DownloaderDataProvider.Launcher.csproj | 2 +- Engine/QuantConnect.Lean.Engine.csproj | 2 +- Indicators/QuantConnect.Indicators.csproj | 2 +- Launcher/QuantConnect.Lean.Launcher.csproj | 2 +- Launcher/config.json | 6 +- Logging/QuantConnect.Logging.csproj | 2 +- Messaging/QuantConnect.Messaging.csproj | 2 +- .../QuantConnect.Optimizer.Launcher.csproj | 2 +- Optimizer/QuantConnect.Optimizer.csproj | 2 +- Queues/QuantConnect.Queues.csproj | 2 +- Report/QuantConnect.Report.csproj | 2 +- Research/QuantConnect.Research.csproj | 2 +- Tests/QuantConnect.Tests.csproj | 2 +- ToolBox/QuantConnect.ToolBox.csproj | 2 +- 29 files changed, 379 insertions(+), 29 deletions(-) create mode 100644 Algorithm.CSharp/IGLiveTestAlgorithm.cs diff --git a/Algorithm.CSharp/IGLiveTestAlgorithm.cs b/Algorithm.CSharp/IGLiveTestAlgorithm.cs new file mode 100644 index 000000000000..723299f5d96d --- /dev/null +++ b/Algorithm.CSharp/IGLiveTestAlgorithm.cs @@ -0,0 +1,61 @@ +/* + * Simple live test algorithm for IG Markets brokerage + * Subscribes to EURUSD, logs market data, and places a small test trade + */ + +using System; +using QuantConnect.Data; +using QuantConnect.Orders; + +namespace QuantConnect.Algorithm.CSharp +{ + public class IGLiveTestAlgorithm : QCAlgorithm + { + private Symbol _eurusd; + private bool _tradePlaced; + private int _dataPoints; + + public override void Initialize() + { + SetStartDate(DateTime.UtcNow.Date); + SetCash(100000); + + SetBrokerageModel(Brokerages.BrokerageName.IG, AccountType.Margin); + + // Subscribe to EURUSD forex pair on IG market + _eurusd = AddForex("EURUSD", Resolution.Second, Market.IG).Symbol; + + Log("IGLiveTestAlgorithm: Initialized - subscribing to EURUSD on IG Markets"); + } + + public override void OnData(Slice data) + { + _dataPoints++; + + if (data.QuoteBars.ContainsKey(_eurusd)) + { + var bar = data.QuoteBars[_eurusd]; + Log($"IGLiveTestAlgorithm: EURUSD Bid={bar.Bid.Close} Ask={bar.Ask.Close} Time={bar.EndTime}"); + } + + // Place a small market order after receiving some data + if (!_tradePlaced && _dataPoints >= 3) + { + Log("IGLiveTestAlgorithm: Placing test market order - Buy 1000 EURUSD"); + var ticket = MarketOrder(_eurusd, 1000); + _tradePlaced = true; + Log($"IGLiveTestAlgorithm: Order placed - Ticket ID: {ticket.OrderId}"); + } + } + + public override void OnOrderEvent(OrderEvent orderEvent) + { + Log($"IGLiveTestAlgorithm: OrderEvent - {orderEvent}"); + } + + public override void OnEndOfAlgorithm() + { + Log($"IGLiveTestAlgorithm: Algorithm ended. Total data points received: {_dataPoints}"); + } + } +} diff --git a/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj b/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj index 130ef0873797..318f77c54be4 100644 --- a/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj +++ b/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Algorithm.CSharp QuantConnect.Algorithm.CSharp - net6.0 + net10.0 false bin\$(Configuration)\ AllEnabledByDefault diff --git a/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj b/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj index 0c3f16004395..1cd1d678d750 100644 --- a/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj +++ b/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Algorithm.Framework QuantConnect.Algorithm.Framework - net6.0 + net10.0 false bin\$(Configuration)\ AllEnabledByDefault diff --git a/Algorithm.Python/QuantConnect.Algorithm.Python.csproj b/Algorithm.Python/QuantConnect.Algorithm.Python.csproj index 337fcde9abb1..28a7eb1304fc 100644 --- a/Algorithm.Python/QuantConnect.Algorithm.Python.csproj +++ b/Algorithm.Python/QuantConnect.Algorithm.Python.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Algorithm.Python QuantConnect.Algorithm.Python - net6.0 + net10.0 AllEnabledByDefault bin\$(Configuration)\ false diff --git a/Algorithm/QuantConnect.Algorithm.csproj b/Algorithm/QuantConnect.Algorithm.csproj index 6c2faa60c1a0..2408b10fbce1 100644 --- a/Algorithm/QuantConnect.Algorithm.csproj +++ b/Algorithm/QuantConnect.Algorithm.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Algorithm QuantConnect.Algorithm - net6.0 + net10.0 ..\ false AllEnabledByDefault diff --git a/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj b/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj index 64a98ae80634..ac91612d6dba 100644 --- a/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj +++ b/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.AlgorithmFactory QuantConnect.AlgorithmFactory - net6.0 + net10.0 false bin\$(Configuration)\ AllEnabledByDefault diff --git a/Api/QuantConnect.Api.csproj b/Api/QuantConnect.Api.csproj index 1260d9e42069..4c06a2e5213e 100644 --- a/Api/QuantConnect.Api.csproj +++ b/Api/QuantConnect.Api.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Api QuantConnect.Api - net6.0 + net10.0 ..\ true AllEnabledByDefault diff --git a/Brokerages/QuantConnect.Brokerages.csproj b/Brokerages/QuantConnect.Brokerages.csproj index b95a054f94a2..e44042df0a51 100644 --- a/Brokerages/QuantConnect.Brokerages.csproj +++ b/Brokerages/QuantConnect.Brokerages.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Brokerages QuantConnect.Brokerages - net6.0 + net10.0 AllEnabledByDefault false bin\$(Configuration)\ diff --git a/Common/Brokerages/IBrokerageModel.cs b/Common/Brokerages/IBrokerageModel.cs index 4544c388d8c1..ab261a236484 100644 --- a/Common/Brokerages/IBrokerageModel.cs +++ b/Common/Brokerages/IBrokerageModel.cs @@ -291,6 +291,9 @@ public static IBrokerageModel Create(IOrderProvider orderProvider, BrokerageName case BrokerageName.DYDX: return new dYdXBrokerageModel(accountType); + case BrokerageName.IG: + return new IGBrokerageModel(accountType); + default: throw new ArgumentOutOfRangeException(nameof(brokerage), brokerage, null); } diff --git a/Common/Market.cs b/Common/Market.cs index d0fae94b6d9a..f16bf34cd01c 100644 --- a/Common/Market.cs +++ b/Common/Market.cs @@ -71,7 +71,8 @@ public static class Market Tuple.Create(InteractiveBrokers, 39), Tuple.Create(EUREX, 40), Tuple.Create(OSE, 41), - Tuple.Create(DYDX, 42) + Tuple.Create(DYDX, 42), + Tuple.Create(IG, 43) }; static Market() diff --git a/Common/QuantConnect.csproj b/Common/QuantConnect.csproj index 5d74ddf7d852..e39b3a918c5f 100644 --- a/Common/QuantConnect.csproj +++ b/Common/QuantConnect.csproj @@ -2,7 +2,7 @@ Debug AnyCPU - net6.0 + net10.0 QuantConnect.Common ..\ true diff --git a/Compression/QuantConnect.Compression.csproj b/Compression/QuantConnect.Compression.csproj index b121078fa105..66a19b888f51 100644 --- a/Compression/QuantConnect.Compression.csproj +++ b/Compression/QuantConnect.Compression.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Compression QuantConnect.Compression - net6.0 + net10.0 AllEnabledByDefault false bin\$(Configuration)\ diff --git a/Configuration/QuantConnect.Configuration.csproj b/Configuration/QuantConnect.Configuration.csproj index aaeea5886f2b..e2b797aee2b4 100644 --- a/Configuration/QuantConnect.Configuration.csproj +++ b/Configuration/QuantConnect.Configuration.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Configuration QuantConnect.Configuration - net6.0 + net10.0 ..\ true AllEnabledByDefault diff --git a/Data/market-hours/market-hours-database.json b/Data/market-hours/market-hours-database.json index 507913acf45a..fe027fde054d 100644 --- a/Data/market-hours/market-hours-database.json +++ b/Data/market-hours/market-hours-database.json @@ -122781,6 +122781,262 @@ "holidays": [], "earlyCloses": {}, "lateOpens": {} + }, + "Forex-ig-[*]": { + "dataTimeZone": "UTC", + "exchangeTimeZone": "UTC", + "sunday": [ + { + "start": "22:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "monday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "tuesday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "wednesday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "thursday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "friday": [ + { + "start": "00:00:00", + "end": "22:00:00", + "state": "market" + } + ], + "saturday": [], + "holidays": [], + "earlyCloses": {}, + "lateOpens": {} + }, + "Index-ig-[*]": { + "dataTimeZone": "UTC", + "exchangeTimeZone": "UTC", + "sunday": [ + { + "start": "22:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "monday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "tuesday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "wednesday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "thursday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "friday": [ + { + "start": "00:00:00", + "end": "22:00:00", + "state": "market" + } + ], + "saturday": [], + "holidays": [], + "earlyCloses": {}, + "lateOpens": {} + }, + "Crypto-ig-[*]": { + "dataTimeZone": "UTC", + "exchangeTimeZone": "UTC", + "sunday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "monday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "tuesday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "wednesday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "thursday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "friday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "saturday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "holidays": [], + "earlyCloses": {}, + "lateOpens": {} + }, + "Cfd-ig-[*]": { + "dataTimeZone": "UTC", + "exchangeTimeZone": "UTC", + "sunday": [ + { + "start": "22:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "monday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "tuesday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "wednesday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "thursday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "friday": [ + { + "start": "00:00:00", + "end": "22:00:00", + "state": "market" + } + ], + "saturday": [], + "holidays": [], + "earlyCloses": {}, + "lateOpens": {} + }, + "Equity-ig-[*]": { + "dataTimeZone": "UTC", + "exchangeTimeZone": "UTC", + "sunday": [ + { + "start": "22:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "monday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "tuesday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "wednesday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "thursday": [ + { + "start": "00:00:00", + "end": "1.00:00:00", + "state": "market" + } + ], + "friday": [ + { + "start": "00:00:00", + "end": "22:00:00", + "state": "market" + } + ], + "saturday": [], + "holidays": [], + "earlyCloses": {}, + "lateOpens": {} } } -} +} \ No newline at end of file diff --git a/Data/symbol-properties/symbol-properties-database.csv b/Data/symbol-properties/symbol-properties-database.csv index ef8d02d02d67..11994733683b 100644 --- a/Data/symbol-properties/symbol-properties-database.csv +++ b/Data/symbol-properties/symbol-properties-database.csv @@ -10407,4 +10407,33 @@ dydx,ZETAUSD,cryptofuture,ZETA-USD,USD,1,0.0001,10,ZETA-USD,10.00000,10000000000 dydx,ZKUSD,cryptofuture,ZK-USD,USD,1,0.0001,10,ZK-USD,10.00000,10000000000,100000 dydx,ZORAUSD,cryptofuture,ZORA-USD,USD,1,0.00001,100,ZORA-USD,100.0000,100000000000,10000 dydx,ZROUSD,cryptofuture,ZRO-USD,USD,1,0.001,1,ZRO-USD,1.000000,1000000000,1000000 -dydx,ZRXUSD,cryptofuture,ZRX-USD,USD,1,0.0001,10,ZRX-USD,10.00000,10000000000,100000 \ No newline at end of file +dydx,ZRXUSD,cryptofuture,ZRX-USD,USD,1,0.0001,10,ZRX-USD,10.00000,10000000000,100000 +# IG Markets +ig,EURUSD,forex,,USD,1,0.00001,1000,,1 +ig,GBPUSD,forex,,USD,1,0.00001,1000,,1 +ig,USDJPY,forex,,JPY,1,0.001,1000,,1 +ig,AUDUSD,forex,,USD,1,0.00001,1000,,1 +ig,USDCAD,forex,,CAD,1,0.00001,1000,,1 +ig,USDCHF,forex,,CHF,1,0.00001,1000,,1 +ig,NZDUSD,forex,,USD,1,0.00001,1000,,1 +ig,EURGBP,forex,,GBP,1,0.00001,1000,,1 +ig,EURJPY,forex,,JPY,1,0.001,1000,,1 +ig,GBPJPY,forex,,JPY,1,0.001,1000,,1 +ig,EURCHF,forex,,CHF,1,0.00001,1000,,1 +ig,EURAUD,forex,,AUD,1,0.00001,1000,,1 +ig,AUDJPY,forex,,JPY,1,0.001,1000,,1 +ig,CADJPY,forex,,JPY,1,0.001,1000,,1 +ig,CHFJPY,forex,,JPY,1,0.001,1000,,1 +ig,NZDJPY,forex,,JPY,1,0.001,1000,,1 +ig,SPX,index,,USD,1,0.01,1,,1 +ig,DJI,index,,USD,1,0.01,1,,1 +ig,NDX,index,,USD,1,0.01,1,,1 +ig,FTSE,index,,GBP,1,0.01,1,,1 +ig,DAX,index,,EUR,1,0.01,1,,1 +ig,BTCUSD,crypto,,USD,1,0.01,0.001,,0.001 +ig,ETHUSD,crypto,,USD,1,0.01,0.01,,0.01 +ig,XAUUSD,cfd,,USD,1,0.01,1,,1 +ig,XAGUSD,cfd,,USD,1,0.001,1,,1 +ig,AAPL,equity,,USD,1,0.01,1,,1 +ig,TSLA,equity,,USD,1,0.01,1,,1 +ig,AMZN,equity,,USD,1,0.01,1,,1 diff --git a/DownloaderDataProvider/QuantConnect.DownloaderDataProvider.Launcher.csproj b/DownloaderDataProvider/QuantConnect.DownloaderDataProvider.Launcher.csproj index 710c5ae91611..7e8ae152ec8a 100644 --- a/DownloaderDataProvider/QuantConnect.DownloaderDataProvider.Launcher.csproj +++ b/DownloaderDataProvider/QuantConnect.DownloaderDataProvider.Launcher.csproj @@ -6,7 +6,7 @@ Exe QuantConnect.DownloaderDataProvider.Launcher QuantConnect.DownloaderDataProvider.Launcher - net6.0 + net10.0 AllEnabledByDefault false bin\$(Configuration)\ diff --git a/Engine/QuantConnect.Lean.Engine.csproj b/Engine/QuantConnect.Lean.Engine.csproj index 2a0c0e2455e6..5163599312dc 100644 --- a/Engine/QuantConnect.Lean.Engine.csproj +++ b/Engine/QuantConnect.Lean.Engine.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Lean.Engine QuantConnect.Lean.Engine - net6.0 + net10.0 ..\ true publish\ diff --git a/Indicators/QuantConnect.Indicators.csproj b/Indicators/QuantConnect.Indicators.csproj index f102c018f516..6ad6bc016291 100644 --- a/Indicators/QuantConnect.Indicators.csproj +++ b/Indicators/QuantConnect.Indicators.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Indicators QuantConnect.Indicators - net6.0 + net10.0 AllEnabledByDefault false bin\$(Configuration)\ diff --git a/Launcher/QuantConnect.Lean.Launcher.csproj b/Launcher/QuantConnect.Lean.Launcher.csproj index d300d6e06218..dfea79a8e24c 100644 --- a/Launcher/QuantConnect.Lean.Launcher.csproj +++ b/Launcher/QuantConnect.Lean.Launcher.csproj @@ -5,7 +5,7 @@ Exe QuantConnect.Lean.Launcher QuantConnect.Lean.Launcher - net6.0 + net10.0 AllEnabledByDefault false bin\$(Configuration)\ diff --git a/Launcher/config.json b/Launcher/config.json index 9ffabcb873a9..0e6752be252b 100644 --- a/Launcher/config.json +++ b/Launcher/config.json @@ -6,10 +6,10 @@ // two predefined environments, 'backtesting' and 'live', feel free // to add more! - "environment": "backtesting", // "live-paper", "backtesting", "live-interactive", "live-interactive-iqfeed" + "environment": "live-ig", // "live-paper", "backtesting", "live-interactive", "live-interactive-iqfeed", "live-ig" // algorithm class selector - "algorithm-type-name": "BasicTemplateFrameworkAlgorithm", + "algorithm-type-name": "IGLiveTestAlgorithm", // Algorithm language selector - options CSharp, Python "algorithm-language": "CSharp", @@ -125,7 +125,7 @@ // ig markets configuration "ig-environment": "demo", // "demo" or "live" - "ig-api-url": "", // Leave empty to use default based on environment + "ig-api-url": "https://demo-api.ig.com/gateway/deal", "ig-identifier": "", "ig-password": "", "ig-api-key": "", diff --git a/Logging/QuantConnect.Logging.csproj b/Logging/QuantConnect.Logging.csproj index 4b4a7e6fa0d2..4040ff227d09 100644 --- a/Logging/QuantConnect.Logging.csproj +++ b/Logging/QuantConnect.Logging.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Logging QuantConnect.Logging - net6.0 + net10.0 ..\ true AllEnabledByDefault diff --git a/Messaging/QuantConnect.Messaging.csproj b/Messaging/QuantConnect.Messaging.csproj index 2f2ee0a012b8..5a4cee268b08 100644 --- a/Messaging/QuantConnect.Messaging.csproj +++ b/Messaging/QuantConnect.Messaging.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Messaging QuantConnect.Messaging - net6.0 + net10.0 AllEnabledByDefault false bin\$(Configuration)\ diff --git a/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj b/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj index 37b602f47ae1..e9661b733e81 100644 --- a/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj +++ b/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj @@ -5,7 +5,7 @@ Exe QuantConnect.Optimizer.Launcher QuantConnect.Optimizer.Launcher - net6.0 + net10.0 false bin\$(Configuration)\ AllEnabledByDefault diff --git a/Optimizer/QuantConnect.Optimizer.csproj b/Optimizer/QuantConnect.Optimizer.csproj index 0edb5f53540d..552252fde267 100644 --- a/Optimizer/QuantConnect.Optimizer.csproj +++ b/Optimizer/QuantConnect.Optimizer.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Optimizer QuantConnect.Optimizer - net6.0 + net10.0 false bin\$(Configuration)\ AllEnabledByDefault diff --git a/Queues/QuantConnect.Queues.csproj b/Queues/QuantConnect.Queues.csproj index 012cfad65120..7a24256fe9d7 100644 --- a/Queues/QuantConnect.Queues.csproj +++ b/Queues/QuantConnect.Queues.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Queues QuantConnect.Queues - net6.0 + net10.0 false bin\$(Configuration)\ bin\$(Configuration)\QuantConnect.Queues.xml diff --git a/Report/QuantConnect.Report.csproj b/Report/QuantConnect.Report.csproj index 853c2063d6bf..706e7866e6fe 100644 --- a/Report/QuantConnect.Report.csproj +++ b/Report/QuantConnect.Report.csproj @@ -5,7 +5,7 @@ Exe QuantConnect.Report QuantConnect.Report - net6.0 + net10.0 false bin\$(Configuration)\ bin\$(Configuration)\QuantConnect.Report.xml diff --git a/Research/QuantConnect.Research.csproj b/Research/QuantConnect.Research.csproj index 99c2f5b2702c..08eea2a55bdb 100644 --- a/Research/QuantConnect.Research.csproj +++ b/Research/QuantConnect.Research.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Research QuantConnect.Research - net6.0 + net10.0 AllEnabledByDefault bin\$(Configuration)\ false diff --git a/Tests/QuantConnect.Tests.csproj b/Tests/QuantConnect.Tests.csproj index 1ac4701ffdb4..9ec36875f36a 100644 --- a/Tests/QuantConnect.Tests.csproj +++ b/Tests/QuantConnect.Tests.csproj @@ -4,7 +4,7 @@ AnyCPU QuantConnect.Tests QuantConnect.Tests - net6.0 + net10.0 ..\ AllEnabledByDefault false diff --git a/ToolBox/QuantConnect.ToolBox.csproj b/ToolBox/QuantConnect.ToolBox.csproj index 33811e2da899..196fe98c86f9 100644 --- a/ToolBox/QuantConnect.ToolBox.csproj +++ b/ToolBox/QuantConnect.ToolBox.csproj @@ -5,7 +5,7 @@ Exe QuantConnect.ToolBox QuantConnect.ToolBox - net6.0 + net10.0 AllEnabledByDefault false bin\$(Configuration)\ From 8f16e97103befa86cb9fba340a04b0005afc8ec5 Mon Sep 17 00:00:00 2001 From: fabo <61707860+fabiankliem@users.noreply.github.com> Date: Tue, 17 Feb 2026 17:26:41 +0400 Subject: [PATCH 5/5] Rename ig-identifier to ig-username in IG brokerage config --- Launcher/config.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Launcher/config.json b/Launcher/config.json index 0e6752be252b..5f1d0047c51c 100644 --- a/Launcher/config.json +++ b/Launcher/config.json @@ -126,10 +126,10 @@ // ig markets configuration "ig-environment": "demo", // "demo" or "live" "ig-api-url": "https://demo-api.ig.com/gateway/deal", - "ig-identifier": "", - "ig-password": "", - "ig-api-key": "", - "ig-account-id": "", + "ig-username": "fabo9981", + "ig-password": "Herbwert2qfst3gbhr,", + "ig-api-key": "aea342855b902e0447395a39f867c04175dd7089", + "ig-account-id": "Z684C1", // iqfeed configuration "iqfeed-host": "127.0.0.1",