/// <summary> /// ctor /// </summary> /// <param name="credentials"></param> protected AuthenticationProvider(ApiCredentials credentials) { if (credentials.Secret == null) { throw new ArgumentException("ApiKey/Secret needed"); } Credentials = credentials; _sBytes = Encoding.UTF8.GetBytes(credentials.Secret.GetString()); }
public BitmexClientOptions(string key, string secret, bool isTest = false) : base("https://www.bitmex.com/api/v1") { ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials(key, secret); if (isTest) { BaseAddress = "https://testnet.bitmex.com/api/v1"; } LogLevel = Microsoft.Extensions.Logging.LogLevel.Debug; LogWriters = new List <ILogger> { new DebugLogger() }; }
public BitmexClientOptions(string key, string secret, bool isTest = false) : base("https://www.bitmex.com/api/v1") { ApiCredentials = new CryptoExchange.Net.Authentication.ApiCredentials(key, secret); if (isTest) { BaseAddress = "https://testnet.bitmex.com/api/v1"; } this.LogVerbosity = CryptoExchange.Net.Logging.LogVerbosity.Debug; LogWriters = new List <System.IO.TextWriter>() { new DebugTextWriter() }; }
/// <summary> /// ctor /// </summary> /// <param name="credentials"></param> protected AuthenticationProvider(ApiCredentials credentials) { Credentials = credentials; }