private KunaClient GetClientWithAuthentication(bool pro) { var config = new ConfigurationBuilder().AddJsonFile("keys.json").Build(); var key = config["key"]; var secret = config["secret"]; ApiCredentials c = string.IsNullOrEmpty(key) ? null : new CryptoExchange.Net.Authentication.ApiCredentials(key, secret); var client = new KunaClient(new KunaClientOptions() { ApiCredentials = c, LogLevel = LogLevel.Debug, LogWriters = new List <ILogger>() { new DebugLogger(), new ConsoleLogger() }, IsProAccount = pro, //RateLimiters = new List<CryptoExchange.Net.Interfaces.IRateLimiter>() { new RateLimiterTotal(1100, TimeSpan.FromMinutes(1)) }, //RateLimitingBehaviour = CryptoExchange.Net.Objects.RateLimitingBehaviour.Fail, RequestTimeout = TimeSpan.FromSeconds(4) }); return(client); }
public KunaV2ApiClient(Log log, KunaClient baseClient, KunaClientOptions options, KunaApiClientOptions apiOptions) : base(options, apiOptions) { _log = log; _kunaClient = baseClient; }
public KunaExchange(ExchangeSettingsData setting) : base(setting) { _client = new KunaClient(setting); }
public KunaApiClient(Log log, KunaClient baseClient, KunaClientOptions options, KunaApiClientOptions apiOptions) : base(options, apiOptions) { _log = log; _kunaClient = baseClient; OnError = HandleProAccountEndpointError; }
public IntegrationTests() { client = GetClientWithAuthentication(false); }