1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2026-02-16 14:13:46 +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

View File

@ -721,7 +721,16 @@ namespace CryptoExchange.Net.Clients
return; return;
var localTime = DateTime.UtcNow; 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) if (!result)
{ {
_logger.LogWarning("Failed to determine time offset between client and server, timestamping might fail"); _logger.LogWarning("Failed to determine time offset between client and server, timestamping might fail");