1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-11 16:32:57 +00:00

Added handling for setting AutoTimestamp in client options when not implemented

This commit is contained in:
Jkorf
2026-01-21 15:37:59 +01:00
parent 21c8133292
commit cff33bb5ac
+10 -1
View File
@@ -721,7 +721,16 @@ namespace CryptoExchange.Net.Clients
return;
var localTime = DateTime.UtcNow;
var result = await GetServerTimestampAsync().ConfigureAwait(false);
WebCallResult<DateTime> result;
try
{
result = await GetServerTimestampAsync().ConfigureAwait(false);
}
catch (NotImplementedException)
{
throw new ArgumentException("AutoTimestamp is not available for this API");
}
if (!result)
{
_logger.LogWarning("Failed to determine time offset between client and server, timestamping might fail");