Skip to content

Commit

Permalink
fix tick (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssnyder-intrinio authored Jan 13, 2025
1 parent 9911196 commit 968d1be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Intrinio.Realtime/Equities/Tick.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static bool GetTradeBytes(Span<byte> bufferToWriteTo, Trade trade, out in
bufferToWriteTo[26 + symbolLength] = Convert.ToByte(conditionLength);

bool success = BitConverter.TryWriteBytes(bufferToWriteTo.Slice(4 + symbolLength, 2), trade.MarketCenter);
success = success && BitConverter.TryWriteBytes(bufferToWriteTo.Slice(6 + symbolLength, 4), trade.Price);
success = success && BitConverter.TryWriteBytes(bufferToWriteTo.Slice(6 + symbolLength, 4), Convert.ToSingle(trade.Price));
success = success && BitConverter.TryWriteBytes(bufferToWriteTo.Slice(10 + symbolLength, 4), trade.Size);
success = success && BitConverter.TryWriteBytes(bufferToWriteTo.Slice(14 + symbolLength, 8), Convert.ToUInt64((trade.Timestamp - DateTime.UnixEpoch).Ticks) * 100UL);
success = success && BitConverter.TryWriteBytes(bufferToWriteTo.Slice(22 + symbolLength, 4), Convert.ToUInt32(trade.TotalVolume));
Expand Down Expand Up @@ -163,7 +163,7 @@ public static bool GetQuoteBytes(Span<byte> bufferToWriteTo, Quote quote, out in
bufferToWriteTo[22 + symbolLength] = Convert.ToByte(conditionLength);

bool success = BitConverter.TryWriteBytes(bufferToWriteTo.Slice(4 + symbolLength, 2), quote.MarketCenter);
success = success && BitConverter.TryWriteBytes(bufferToWriteTo.Slice(6 + symbolLength, 4), quote.Price);
success = success && BitConverter.TryWriteBytes(bufferToWriteTo.Slice(6 + symbolLength, 4), Convert.ToSingle(quote.Price));
success = success && BitConverter.TryWriteBytes(bufferToWriteTo.Slice(10 + symbolLength, 4), quote.Size);
success = success && BitConverter.TryWriteBytes(bufferToWriteTo.Slice(14 + symbolLength, 8), Convert.ToUInt64((quote.Timestamp - DateTime.UnixEpoch).Ticks) * 100UL);

Expand Down
2 changes: 1 addition & 1 deletion Intrinio.Realtime/WebSocketClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public abstract class WebSocketClient
private readonly Func<Task> _tryReconnect;
private readonly HttpClient _httpClient = new ();
private const string ClientInfoHeaderKey = "Client-Information";
private const string ClientInfoHeaderValue = "IntrinioDotNetSDKv12.6";
private const string ClientInfoHeaderValue = "IntrinioDotNetSDKv12.7";
private readonly ThreadPriority _mainThreadPriority;
private readonly Thread[] _threads;
private Thread? _receiveThread;
Expand Down
4 changes: 2 additions & 2 deletions IntrinioRealTimeClient.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package>
<metadata>
<id>IntrinioRealTimeClient</id>
<version>12.6.0</version>
<version>12.7.0</version>
<title>Intrinio SDK for Real-Time Stock and Option Prices</title>
<authors>Intrinio</authors>
<owners>Intrinio</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
<projectUrl>https://github.com/intrinio/intrinio-realtime-csharp-sdk</projectUrl>
<description>Intrinio provides real-time stock and option prices via a two-way WebSocket connection.</description>
<releaseNotes>Version 12.6.0 release.</releaseNotes>
<releaseNotes>Version 12.7.0 release.</releaseNotes>
<copyright>Copyright 2024 Intrinio</copyright>
<tags>fintech stocks options prices websocket real-time market finance</tags>
<dependencies>
Expand Down

0 comments on commit 968d1be

Please sign in to comment.