From cff33bb5acfb7f5e78949beefaa760708ce20f7c Mon Sep 17 00:00:00 2001 From: Jkorf Date: Wed, 21 Jan 2026 15:37:59 +0100 Subject: [PATCH] Added handling for setting AutoTimestamp in client options when not implemented --- CryptoExchange.Net/Clients/RestApiClient.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CryptoExchange.Net/Clients/RestApiClient.cs b/CryptoExchange.Net/Clients/RestApiClient.cs index ee584a3..3598c83 100644 --- a/CryptoExchange.Net/Clients/RestApiClient.cs +++ b/CryptoExchange.Net/Clients/RestApiClient.cs @@ -721,7 +721,16 @@ namespace CryptoExchange.Net.Clients return; var localTime = DateTime.UtcNow; - var result = await GetServerTimestampAsync().ConfigureAwait(false); + WebCallResult 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");