From 618c4922b9976528a52810f8888121923e0fcff6 Mon Sep 17 00:00:00 2001 From: JKorf Date: Wed, 22 Jan 2025 19:11:38 +0100 Subject: [PATCH] Added Authenticated property to IBaseApiClient interface --- CryptoExchange.Net/Clients/BaseApiClient.cs | 4 +--- CryptoExchange.Net/Interfaces/IBaseApiClient.cs | 7 ++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CryptoExchange.Net/Clients/BaseApiClient.cs b/CryptoExchange.Net/Clients/BaseApiClient.cs index 8d1889b..b827b6f 100644 --- a/CryptoExchange.Net/Clients/BaseApiClient.cs +++ b/CryptoExchange.Net/Clients/BaseApiClient.cs @@ -38,9 +38,7 @@ namespace CryptoExchange.Net.Clients /// public bool OutputOriginalData { get; } - /// - /// Whether or not API credentials have been configured for this client. Does not check the credentials are actually valid. - /// + /// public bool Authenticated => ApiOptions.ApiCredentials != null || ClientOptions.ApiCredentials != null; /// diff --git a/CryptoExchange.Net/Interfaces/IBaseApiClient.cs b/CryptoExchange.Net/Interfaces/IBaseApiClient.cs index 9b321b1..21867c8 100644 --- a/CryptoExchange.Net/Interfaces/IBaseApiClient.cs +++ b/CryptoExchange.Net/Interfaces/IBaseApiClient.cs @@ -16,6 +16,11 @@ namespace CryptoExchange.Net.Interfaces /// string BaseAddress { get; } + /// + /// Whether or not API credentials have been configured for this client. Does not check the credentials are actually valid. + /// + bool Authenticated { get; } + /// /// Format a base and quote asset to an exchange accepted symbol /// @@ -36,7 +41,7 @@ namespace CryptoExchange.Net.Interfaces /// /// Set new options. Note that when using a proxy this should be provided in the options even when already set before or it will be reset. /// - /// Api crentials type + /// Api credentials type /// Options to set void SetOptions(UpdateOptions options) where T : ApiCredentials; }