mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2026-02-16 14:13:46 +00:00
Compare commits
2 Commits
c71a81e686
...
5942423bfb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5942423bfb | ||
|
|
dc4abc42a7 |
@ -6,9 +6,9 @@
|
|||||||
<PackageId>CryptoExchange.Net</PackageId>
|
<PackageId>CryptoExchange.Net</PackageId>
|
||||||
<Authors>JKorf</Authors>
|
<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>
|
<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.3</PackageVersion>
|
<PackageVersion>10.2.4</PackageVersion>
|
||||||
<AssemblyVersion>10.2.3</AssemblyVersion>
|
<AssemblyVersion>10.2.4</AssemblyVersion>
|
||||||
<FileVersion>10.2.3</FileVersion>
|
<FileVersion>10.2.4</FileVersion>
|
||||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
<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>
|
<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>
|
<RepositoryType>git</RepositoryType>
|
||||||
|
|||||||
@ -640,6 +640,34 @@ namespace CryptoExchange.Net.OrderBook
|
|||||||
return new CallResult<bool>(true);
|
return new CallResult<bool>(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wait until an update has been buffered
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="timeout">Max wait time</param>
|
||||||
|
/// <param name="ct">Cancellation token</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
protected async Task<CallResult<bool>> WaitUntilFirstUpdateBufferedAsync(TimeSpan timeout, CancellationToken ct)
|
||||||
|
{
|
||||||
|
var startWait = DateTime.UtcNow;
|
||||||
|
while (_processBuffer.Count == 0)
|
||||||
|
{
|
||||||
|
if (ct.IsCancellationRequested)
|
||||||
|
return new CallResult<bool>(new CancellationRequestedError());
|
||||||
|
|
||||||
|
if (DateTime.UtcNow - startWait > timeout)
|
||||||
|
return new CallResult<bool>(new ServerError(new ErrorInfo(ErrorType.OrderBookTimeout, "Timeout while waiting for data")));
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await Task.Delay(20, ct).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
catch (OperationCanceledException)
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
|
||||||
|
return new CallResult<bool>(true);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// IDisposable implementation for the order book
|
/// IDisposable implementation for the order book
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -1002,7 +1030,8 @@ namespace CryptoExchange.Net.OrderBook
|
|||||||
|
|
||||||
private SequenceNumberResult ValidateLiveSequenceNumber(long sequenceNumber)
|
private SequenceNumberResult ValidateLiveSequenceNumber(long sequenceNumber)
|
||||||
{
|
{
|
||||||
if (sequenceNumber < LastSequenceNumber)
|
if (sequenceNumber < LastSequenceNumber
|
||||||
|
&& (_firstUpdateAfterSnapshotDone || !_skipSequenceCheckFirstUpdateAfterSnapshotSet))
|
||||||
// Update is somehow from before the current state
|
// Update is somehow from before the current state
|
||||||
return SequenceNumberResult.OutOfSync;
|
return SequenceNumberResult.OutOfSync;
|
||||||
|
|
||||||
|
|||||||
@ -66,6 +66,12 @@ 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).
|
Alternatively, sponsor me on Github using [Github Sponsors](https://github.com/sponsors/JKorf).
|
||||||
|
|
||||||
## Release notes
|
## Release notes
|
||||||
|
* Version 10.2.4 - 17 Jan 2026
|
||||||
|
* Added WaitUntilFirstUpdateBufferedAsync method on SymbolOrderBook
|
||||||
|
* Added some util methods
|
||||||
|
* Added CommaSplitStringConverter
|
||||||
|
* Fixed sequence validation bug SymbolOrderBook
|
||||||
|
|
||||||
* Version 10.2.3 - 14 Jan 2026
|
* 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
|
* 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
|
* Fixed semaphore exception when creating a new REST client while time sync is in progress on another client
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user