Hi,
When I try to deploy my strategy live with Kraken, I get the runtime error below.
Here is the minimal code to reproduce the issue.
Any idea how can I fix this?
from AlgorithmImports import *
class TestStrategy(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2024, 1, 1)
self.SetCash("USD", 500) # Add $500
self.SetCash("BTC", 0.008) # Add 0.008 XBT
self.SetCash("ETH", 0.15) # Add 0.15 ETH
# Set the broker model to Kraken
self.SetBrokerageModel(BrokerageName.Kraken, AccountType.Cash)
# Add XBTUSD and ETHUSD with minute resolution
self.btc_symbol = self.AddCrypto("BTCUSD", Resolution.Minute, Market.Kraken).Symbol
self.eth_symbol = self.AddCrypto("ETHUSD", Resolution.Minute, Market.Kraken).Symbol
def OnData(self, slice):
pass
During the algorithm initialization, the following exception has occurred: System.Exception: KrakenBrokerage.GetOhlcBars: request failed: [
"EQuery:Invalid asset pair"
]
at QuantConnect.Brokerages.Kraken.KrakenBrokerage.a(String A_0, String A_1, IDictionary`2 A_2, Method A_3, Boolean A_4)
at QuantConnect.Brokerages.Kraken.KrakenBrokerage.a(HistoryRequest A_0, String A_1, TimeSpan A_2)+b()
at QuantConnect.Lean.Engine.DataFeeds.Enumerators.FillForwardEnumerator.MoveNext() in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/LeanEnterprise/Engine/DataFeeds/Enumerators/FillForwardEnumerator.cs:line 156
at QuantConnect.Lean.Engine.DataFeeds.Enumerators.SubscriptionDataEnumerator.MoveNext() in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/LeanEnterprise/Engine/DataFeeds/Enumerators/SubscriptionDataEnumerator.cs:line 74
at QuantConnect.Lean.Engine.DataFeeds.Subscription.MoveNext() in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/LeanEnterprise/Engine/DataFeeds/Subscription.cs:line 210
at QuantConnect.Lean.Engine.HistoricalData.SynchronizingHistoryProvider.CreateSliceEnumerableFromSubscriptions(List`1 subscriptions, DateTimeZone sliceTimeZone)+MoveNext() in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/LeanEnterprise/Engine/HistoricalData/SynchronizingHistoryProvider.cs:line 66
at QuantConnect.Lean.Engine.DataFeeds.Enumerators.SynchronizingEnumerator`1.GetBruteForceMethod(IEnumerator`1[] enumerators)+MoveNext() in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/LeanEnterprise/Engine/DataFeeds/Enumerators/SynchronizingEnumerator.cs:line 143
at QuantConnect.Lean.Engine.DataFeeds.Enumerators.SynchronizingEnumerator`1.MoveNext() in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/LeanEnterprise/Engine/DataFeeds/Enumerators/SynchronizingEnumerator.cs:line 91
at QuantConnect.Lean.Engine.HistoricalData.HistoryProviderManager.GetHistory(IEnumerable`1 requests, DateTimeZone sliceTimeZone)+MoveNext() in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/LeanEnterprise/Engine/HistoricalData/HistoryProviderManager.cs:line 151
at QuantConnect.Data.SliceExtensions.PushThrough(IEnumerable`1 slices, Action`1 handler) in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/LeanEnterprise/Common/Data/SliceExtensions.cs:line 288
at QuantConnect.Lean.Engine.Setup.BaseSetupHandler.SetupCurrencyConversions(IAlgorithm algorithm, UniverseSelection universeSelection) in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/LeanEnterprise/Engine/Setup/BaseSetupHandler.cs:line 105
at QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler.Setup(SetupHandlerParameters parameters) in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/LeanEnterprise/Engine/Setup/BrokerageSetupHandler.cs:line 322KrakenBrokerage.GetOhlcBars: request failed: [
"EQuery:Invalid asset pair"
] in FillForwardEnumerator.cs:line 156 KrakenBrokerage.GetOhlcBars: request failed: [
"EQuery:Invalid asset pair"
]
Rob2505
Sorry for the poor title. Clicked send too soon, and now I can't edit :/
Rob2505
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!