diff --git a/CryptoExchange.Net/Authentication/ApiCredentials.cs b/CryptoExchange.Net/Authentication/ApiCredentials.cs
index c248ba4..10a9187 100644
--- a/CryptoExchange.Net/Authentication/ApiCredentials.cs
+++ b/CryptoExchange.Net/Authentication/ApiCredentials.cs
@@ -20,6 +20,11 @@ namespace CryptoExchange.Net.Authentication
///
public string Secret { get; set; }
+ ///
+ /// The api passphrase. Not needed on all exchanges
+ ///
+ public string? Pass { get; set; }
+
///
/// Type of the credentials
///
@@ -32,6 +37,18 @@ namespace CryptoExchange.Net.Authentication
/// The api secret or private key used for signing
/// The type of credentials
public ApiCredentials(string key, string secret, ApiCredentialsType credentialType = ApiCredentialsType.Hmac)
+ : this(key, secret, null, credentialType)
+ {
+ }
+
+ ///
+ /// Create Api credentials providing an api key, secret and pass for authentication
+ ///
+ /// The api key / label used for identification
+ /// The api secret or private key used for signing
+ /// The api pass for the key. Not always needed
+ /// The type of credentials
+ public ApiCredentials(string key, string secret, string? pass, ApiCredentialsType credentialType = ApiCredentialsType.Hmac)
{
if (string.IsNullOrEmpty(key) || string.IsNullOrEmpty(secret))
throw new ArgumentException("Key and secret can't be null/empty");
@@ -39,6 +56,7 @@ namespace CryptoExchange.Net.Authentication
CredentialType = credentialType;
Key = key;
Secret = secret;
+ Pass = pass;
}
///
@@ -47,7 +65,7 @@ namespace CryptoExchange.Net.Authentication
///
public virtual ApiCredentials Copy()
{
- return new ApiCredentials(Key, Secret, CredentialType);
+ return new ApiCredentials(Key, Secret, Pass, CredentialType);
}
}
}