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 | |
|---|---|---|---|
| a7ff4416bd | |||
| 669d1f7c9e | |||
| 34ee2d3690 | |||
| 005fb7875d | |||
| fa9300ce97 |
@@ -454,9 +454,6 @@ namespace CryptoExchange.Net.Clients
|
||||
{
|
||||
memoryStream.Position = 0;
|
||||
originalData = await reader.ReadToEndAsync().ConfigureAwait(false);
|
||||
|
||||
if (_logger.IsEnabled(LogLevel.Trace))
|
||||
_logger.RestApiReceivedResponse(request.RequestId, originalData);
|
||||
}
|
||||
|
||||
// Continue processing from the memory stream since the response stream is already read and we can't seek it
|
||||
|
||||
@@ -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.0</PackageVersion>
|
||||
<AssemblyVersion>10.2.0</AssemblyVersion>
|
||||
<FileVersion>10.2.0</FileVersion>
|
||||
<PackageVersion>10.2.2</PackageVersion>
|
||||
<AssemblyVersion>10.2.2</AssemblyVersion>
|
||||
<FileVersion>10.2.2</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>
|
||||
|
||||
@@ -86,8 +86,12 @@ namespace CryptoExchange.Net
|
||||
}
|
||||
else if (serializationType == ArrayParametersSerialization.MultipleValues)
|
||||
{
|
||||
bool firstArrayValue = true;
|
||||
foreach (var entry in (object[])parameter.Value)
|
||||
{
|
||||
if (!firstArrayValue)
|
||||
uriString.Append('&');
|
||||
firstArrayValue = false;
|
||||
uriString.Append(parameter.Key);
|
||||
uriString.Append("=");
|
||||
if (urlEncodeValues)
|
||||
|
||||
@@ -22,7 +22,6 @@ namespace CryptoExchange.Net.Logging.Extensions
|
||||
private static readonly Action<ILogger, string, Exception?> _restApiCacheHit;
|
||||
private static readonly Action<ILogger, string, Exception?> _restApiCacheNotHit;
|
||||
private static readonly Action<ILogger, int?, Exception?> _restApiCancellationRequested;
|
||||
private static readonly Action<ILogger, int?, string?, Exception?> _restApiReceivedResponse;
|
||||
|
||||
static RestApiClientLoggingExtensions()
|
||||
{
|
||||
@@ -90,11 +89,6 @@ namespace CryptoExchange.Net.Logging.Extensions
|
||||
LogLevel.Debug,
|
||||
new EventId(4012, "RestApiCancellationRequested"),
|
||||
"[Req {RequestId}] Request cancelled by user");
|
||||
|
||||
_restApiReceivedResponse = LoggerMessage.Define<int?, string?>(
|
||||
LogLevel.Trace,
|
||||
new EventId(4013, "RestApiReceivedResponse"),
|
||||
"[Req {RequestId}] Received response: {Data}");
|
||||
|
||||
}
|
||||
|
||||
@@ -161,10 +155,5 @@ namespace CryptoExchange.Net.Logging.Extensions
|
||||
{
|
||||
_restApiCancellationRequested(logger, requestId, null);
|
||||
}
|
||||
|
||||
public static void RestApiReceivedResponse(this ILogger logger, int requestId, string? originalData)
|
||||
{
|
||||
_restApiReceivedResponse(logger, requestId, originalData, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1291,8 +1291,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);
|
||||
|
||||
@@ -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.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
|
||||
|
||||
* Version 10.2.0 - 12 Jan 2026
|
||||
* Added EnforceSequenceNumbers property on SocketApiClient to configure whether websocket message contain sequence numbers and if these should be checked to be sequential
|
||||
* Added fallback to existing websocket connection if no dedicated request connection was found
|
||||
|
||||
Reference in New Issue
Block a user