public BittrexBagAndDustHandler(IMicroBus bus, BittrexService bittrexService, DatabaseService databaseService, BagConfig bagConfig, BittrexConfig bittrexConfig, DustConfig dustConfig, LowBtcConfig lowBtcConfig) { _bus = bus; _bittrexService = bittrexService; _databaseService = databaseService; _bagConfig = bagConfig; _bittrexConfig = bittrexConfig; _dustConfig = dustConfig; _lowBtcConfig = lowBtcConfig; }
public HomeController(ApplicationDbContext context, IConfiguration configuration, ILogger <HomeController> logger, BittrexService bittrexService, UserManager <User> userManager) { _context = context; _configuration = configuration; _myApiKey = configuration.GetValue <string>("myApiKey"); _logger = logger; _bittrexService = bittrexService; _userManager = userManager; }
public BittrexDepositWithdrawalHandler( BittrexService bittrexService, BittrexConfig config, GeneralConfig generalConfig, IMicroBus bus) { _bittrexService = bittrexService; _config = config; _generalConfig = generalConfig; _bus = bus; }
public BittrexBagAndDustHandler( IMicroBus bus, GeneralConfig generalConfig, BittrexConfig config, BittrexService bittrexService, DatabaseService databaseService) { _bus = bus; _generalConfig = generalConfig; _config = config; _bittrexService = bittrexService; _databaseService = databaseService; }
public BittrexDepositWithdrawalHandler( BittrexService bittrexService, BittrexConfig config, DatabaseService databaseService, PriceService priceService, IMicroBus bus) { _bittrexService = bittrexService; _config = config; _databaseService = databaseService; _priceService = priceService; _bus = bus; }
public async void BittrexWorker() { logger.Info("Bittrex Start..."); try { BittrexService service = new BittrexService(ContainerManager.Container.Resolve <IRepository <Bittrex> >()); await service.Worker(); } catch (Exception e) { logger.Error(e.Message + "\n" + e.InnerException?.Message); } logger.Info("Bittrex End..."); }
public void Shoul_Save_DataBase_Data_From_Api() { var _container = new WindsorContainer(); _container = new WindsorContainer(); _container.AddFacility <TypedFactoryFacility>(); _container.Register(Component.For(typeof(DbContext)).ImplementedBy(typeof(DbEntities))); _container.Register(Component.For <IDbContextFactory>().AsFactory()); _container.Register(Component.For(typeof(IRepository <>)).ImplementedBy(typeof(BaseRepository <>))); var service = new BittrexService(_container.Kernel.Resolve <IRepository <Bittrex> >()); service.Worker(); }
static void Main(string[] args) { bool test = true; var builder = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json"); IConfiguration config = new ConfigurationBuilder() .AddJsonFile("appsettings.json", true, true) .Build(); if (test) { DirectoryInfo directory = new DirectoryInfo(@"D:\git\TestFiles\7-26"); FileInfo[] files = directory.GetFiles("*.txt"); //Getting Text files foreach (var market in files) { BittrexServiceTest _bittrexService = new BittrexServiceTest(market.FullName); //Todo trading Magic TradingLogicManager tradingManager = new TradingLogicManager(market.FullName, _bittrexService, "PlanningToBuy"); while (_bittrexService.exit == false) { tradingManager.CheckOptions(); } } Console.WriteLine("Done :)"); Console.ReadLine(); } else { AKVService _aKVService = new AKVService(); string _key = _aKVService.GetKeyVaultSecret(config["key"]); string _secret = _aKVService.GetKeyVaultSecret(config["secret"]); var marketName = "USD-BTC"; BittrexService _bittrexService = new BittrexService(_key, _secret); TradingLogicManager tradingManager = new TradingLogicManager(marketName, _bittrexService, "PlanningToBuy"); } }
public BittrexNewOrderCheckHandler(BittrexService bittrexService, IMicroBus bus, BittrexConfig config) { _bittrexService = bittrexService; _bus = bus; _config = config; }
public PriceService(BittrexService bittrexService, PoloniexService poloniexService) { _bittrexService = bittrexService; _poloniexService = poloniexService; }
public BittrexBalanceCheckHandler(BittrexService bittrexService, BittrexConfig config) { _bittrexService = bittrexService; _config = config; }
public ManagePositionsController(ApplicationDbContext context, UserManager <User> userManager, IConfiguration configuration, ILogger <ManagePositionsController> logger, BittrexService bittrexService) { _context = context; _userManager = userManager; _myApiKey = configuration.GetValue <string>("myApiKey"); _logger = logger; _bittrexService = bittrexService; }
public BittrexNewOrderCheckHandler(BittrexService bittrexService, IMicroBus bus) { _bittrexService = bittrexService; _bus = bus; }