Skip to content

Commit

Permalink
Fixed problems with the per-symbol news streaming handling logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegRa committed Apr 3, 2022
1 parent a9eeaf1 commit be67b62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Alpaca.Markets/DataStreamingClientBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ private void handleRealtimeNewsUpdate(
try
{
var channel = token["T"]?.ToString() ?? String.Empty;
var symbols = token["S"]?.Values<String>() ?? Enumerable.Empty<String>();
var symbols = token["symbols"]?.Values<String>() ?? Enumerable.Empty<String>();

foreach (var symbol in symbols.Where(_ => !String.IsNullOrEmpty(_)))
{
Expand Down Expand Up @@ -486,6 +486,7 @@ private ValueTask sendSubscriptionRequestAsync(
? SendAsJsonStringAsync(new JsonSubscriptionUpdate
{
Action = action,
News = getSymbols(streamsByChannels, NewsChannel),
Trades = getSymbols(streamsByChannels, TradesChannel),
Quotes = getSymbols(streamsByChannels, QuotesChannel),
Statuses = getSymbols(streamsByChannels, StatusesChannel),
Expand Down

0 comments on commit be67b62

Please sign in to comment.