mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-12 00:43:03 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 550c0eabf1 | |||
| 28a2a0c7fd | |||
| 7dd1cd5bbd | |||
| a7ff4416bd | |||
| 669d1f7c9e |
@@ -802,7 +802,6 @@ namespace CryptoExchange.Net.Clients
|
||||
return new CallResult<HighPerfSocketConnection<TUpdateType>>(socketConnection);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Process an unhandled message
|
||||
/// </summary>
|
||||
@@ -811,6 +810,14 @@ namespace CryptoExchange.Net.Clients
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process an unhandled message
|
||||
/// </summary>
|
||||
/// <param name="connection">The socket connection</param>
|
||||
/// <param name="typeIdentifier">The type as identified</param>
|
||||
/// <param name="data">The data</param>
|
||||
protected internal virtual bool HandleUnhandledMessage(SocketConnection connection, string typeIdentifier, ReadOnlySpan<byte> data) => false;
|
||||
|
||||
/// <summary>
|
||||
/// Process connect rate limited
|
||||
/// </summary>
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
<PackageId>CryptoExchange.Net</PackageId>
|
||||
<Authors>JKorf</Authors>
|
||||
<Description>CryptoExchange.Net is a base library which is used to implement different cryptocurrency (exchange) API's. It provides a standardized way of implementing different API's, which results in a very similar experience for users of the API implementations.</Description>
|
||||
<PackageVersion>10.2.1</PackageVersion>
|
||||
<AssemblyVersion>10.2.1</AssemblyVersion>
|
||||
<FileVersion>10.2.1</FileVersion>
|
||||
<PackageVersion>10.2.3</PackageVersion>
|
||||
<AssemblyVersion>10.2.3</AssemblyVersion>
|
||||
<FileVersion>10.2.3</FileVersion>
|
||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||
<PackageTags>OKX;OKX.Net;Mexc;Mexc.Net;Kucoin;Kucoin.Net;Kraken;Kraken.Net;Huobi;Huobi.Net;CoinEx;CoinEx.Net;Bybit;Bybit.Net;Bitget;Bitget.Net;Bitfinex;Bitfinex.Net;Binance;Binance.Net;CryptoCurrency;CryptoCurrency Exchange;CryptoExchange.Net</PackageTags>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
|
||||
@@ -571,8 +571,12 @@ namespace CryptoExchange.Net.Sockets.Default
|
||||
|
||||
if (deserializationType == null)
|
||||
{
|
||||
// No handler found for identifier either, can't process
|
||||
_logger.LogWarning("Failed to determine message type for identifier {Identifier}. Data: {Message}", typeIdentifier, Encoding.UTF8.GetString(data.ToArray()));
|
||||
if (!ApiClient.HandleUnhandledMessage(this, typeIdentifier, data))
|
||||
{
|
||||
// No handler found for identifier either, can't process
|
||||
_logger.LogWarning("Failed to determine message type for identifier {Identifier}. Data: {Message}", typeIdentifier, Encoding.UTF8.GetString(data.ToArray()));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1291,8 +1295,9 @@ namespace CryptoExchange.Net.Sockets.Default
|
||||
public void UpdateSequenceNumber(long sequenceNumber)
|
||||
{
|
||||
if (ApiClient.EnforceSequenceNumbers
|
||||
&& _lastSequenceNumber != 0
|
||||
&& _lastSequenceNumber + 1 != sequenceNumber)
|
||||
&& _lastSequenceNumber != 0 // Initial value is 0
|
||||
&& _lastSequenceNumber != sequenceNumber // When there are multiple listeners for the same message it's possible this gets recorded multiple times, shouldn't be an issue
|
||||
&& _lastSequenceNumber + 1 != sequenceNumber) // Expected value
|
||||
{
|
||||
// Not sequential
|
||||
_logger.LogWarning("[Sckt {SocketId}] update not in sequence. Last recorded sequence number: {LastSequence}, update sequence number: {UpdateSequence}. Reconnecting", SocketId, _lastSequenceNumber, sequenceNumber);
|
||||
|
||||
@@ -113,7 +113,8 @@ namespace CryptoExchange.Net
|
||||
/// <param name="api"></param>
|
||||
internal static void RegisterRestApi(string api)
|
||||
{
|
||||
_lastRestDelays[api] = new RestTimeOffset();
|
||||
if (!_lastRestDelays.ContainsKey(api))
|
||||
_lastRestDelays.TryAdd(api, new RestTimeOffset());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -66,6 +66,13 @@ Make a one time donation in a crypto currency of your choice. If you prefer to d
|
||||
Alternatively, sponsor me on Github using [Github Sponsors](https://github.com/sponsors/JKorf).
|
||||
|
||||
## Release notes
|
||||
* Version 10.2.3 - 14 Jan 2026
|
||||
* Added HandleUnhandledMessage virtual method to SocketApiClient to allow some processing for messages which couldn't be mapped via the normal way
|
||||
* Fixed semaphore exception when creating a new REST client while time sync is in progress on another client
|
||||
|
||||
* Version 10.2.2 - 13 Jan 2026
|
||||
* Allow the same websocket connection sequence number to be recorded multiple times
|
||||
|
||||
* Version 10.2.1 - 13 Jan 2026
|
||||
* Removed duplicate logging for rest responses in Trace verbosity
|
||||
* Fixed parameter URL creation for array values with ArrayParametersSerialization.MultipleValues
|
||||
|
||||
Reference in New Issue
Block a user