Hi all,

I am testing an algorithm in the paper trading environment (real time data) using a subset of cryptocurrencies and I noticed my algorithm was not shooting orders as I expected. Upon further inspection, it seems like my sanequote function returns False for seconds bar.

Here are my crypto subscriptions in initialize:

btceur = self.add_crypto('BTCEUR',resolution=Resolution.SECOND, market=Market.Kraken)
etheur = self.add_crypto('ETHEUR',resolution=Resolution.SECOND, market=Market.Kraken)
xrpeur = self.add_crypto('XRPEUR',resolution=Resolution.SECOND, market=Market.Kraken)
def sanequote(self, bar:QuoteBar) -> bool:
        return bar.ask.close > bar.bid.close and bar.LastAskSize > 0 and bar.LastBidSize > 0

The reason is that the ask.close prices are lower than bid.close prices, which seems clearly a bug. Here's a snippet of my algo logs with some examples (all of them are in tz=GMT)

2024-12-17 22:11:39 : QuoteBar is not sane for symbol=BTCEUR => Bid=101970.4@0.05745518 Ask=101200.3@0.26849388, End_Time=2024-12-17 22:11:39
2024-12-17 22:11:39 : QuoteBar is not sane for symbol=ETHEUR => Bid=3805.1@0.00201 Ask=3744.91@41.22146905, End_Time=2024-12-17 22:11:38
2024-12-17 22:12:36 : QuoteBar is not sane for symbol=XRPEUR => Bid=2.56042@2008.20052144 Ask=2.47031@964.35701186, End_Time=2024-12-17 22:12:36

I am using QuantConnect data in my paper trading, albeit the symbols are registered in Kraken exchange. Have any of you encountered this? Have any of you tried using directy Kraken data? Have you encountered the same issues?

Regards,

 

Axel