예제 #1
0
        /// <summary>
        /// Constructor for tests
        /// </summary>
        public BittrexRepoTests()
        {
            IFileRepository _fileRepo = new FileRepository.FileRepository();

            if (_fileRepo.FileExists(configPath))
            {
                _exchangeApi = _fileRepo.GetDataFromFile <ApiInformation>(configPath);
            }
            if (_exchangeApi != null || !string.IsNullOrEmpty(apiKey))
            {
                _repo = new BittrexRepository(_exchangeApi.apiKey, _exchangeApi.apiSecret);
            }
            else
            {
                _repo = new BittrexRepository();
            }
        }
예제 #2
0
 /// <summary>
 /// Constructor - with authentication
 /// </summary>
 /// <param name="configPath">Path to config file</param>
 public BittrexClient(string configPath)
 {
     _repository = new BittrexRepository(configPath);
 }
예제 #3
0
 /// <summary>
 /// Constructor - with authentication
 /// </summary>
 /// <param name="apiKey">Api key</param>
 /// <param name="apiSecret">Api secret</param>
 public BittrexClient(string apiKey, string apiSecret)
 {
     _repository = new BittrexRepository(apiKey, apiSecret);
 }
예제 #4
0
 /// <summary>
 /// Constructor - no authentication
 /// </summary>
 public BittrexClient()
 {
     _repository = new BittrexRepository();
 }