[BUG]: Receiving multiple "minute bar" updates for the same minute
See original GitHub issueIs 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).
(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:
- Created 2 years ago
- Comments:7
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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 theAlpacaCryptoStreamingClientConfiguration
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.@PlayCreatively use the WithExchanges() extension method:
new HistoricalCryptoBarsRequest(...).WithExchanges(...);