question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG]: Receiving multiple "minute bar" updates for the same minute

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I’m not 100% sure if this is a bug or not, but when subscribing to “BTCUSD” with the CryptoStreamingClient.SubscribeMinuteBarAsync(...) method, I’m getting minute bar updates just fine, but periodically I get multiple updates for the same minute in very quick succession (see screenshot below).

image (left timestamp is the bar timestamp, and the right timestamp is DateTime.UtcNow)

I do get different data per event trigger (the latest bar information). Is this expected behavior? This is effecting my calculations and how my code reacts to price changes. Maybe I need to be able to handle this kind of behavior?

Expected Behavior

I would expect the minute bar subscription to only trigger 1 event every minute.

Steps To Reproduce

var dataSubscription = await CryptoStreamingClient.SubscribeMinuteBarAsync("BTCUSD");
dataSubscription.Received += bar => { /* ... */ };

Environment

- SDK Version: 6.0.2-alpha2
- OS (version, bitness): Windows 10 x64
- .NET SDK (version): 6.0

Anything else?

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
OlegRacommented, Sep 12, 2022

@polymorphicshade Thanks for the prompt answer. I’ll just add a small correction: if @PlayCreatively want’s to specify an exchange(s) for the streaming crypto data the WithExchanges method should be called for the AlpacaCryptoStreamingClientConfiguration class instance.

BTW, the underlying REST API for historical crypto data doesn’t support per-exchange bars/trades/quotes anymore so WithExchanges methods for historical data requests will not have any effect in SDK version 6.1.0 and above.

1reaction
polymorphicshadecommented, Sep 12, 2022

@PlayCreatively use the WithExchanges() extension method: new HistoricalCryptoBarsRequest(...).WithExchanges(...);

Read more comments on GitHub >

github_iconTop Results From Across the Web

update stuck at Less than a minute remain…
MacOS Update I keep trying to update to MacOS Monterey but the last step of the process keeps getting stuck on two minutes...
Read more >
closing status of a bar sometimes takes too long
I presume during very quiet periods when there are no update ticks for several minutes (happens overnight but still very rarely) I will...
Read more >
[2023] How to Fix Windows 11 Update Stuck?
Here we have 14 ways to fix windows 11 update stuck error. ... When this update gets stuck for more than five-six minutes...
Read more >
Capture and read bug reports | Android Studio
A bug report contains device logs, stack traces, and other diagnostic information to help you find and fix bugs in your app.
Read more >
Troubleshoot Microsoft Teams installation and update ...
Learn how to troubleshoot installation and update issues for the Teams desktop client app on Windows.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found