示例#1
0
 public TradersManager(ICryptoApi cryptoApi, IClusterClient clusterClient, IHubNotifier hubNotifier, IPushManager pushManager)
 {
     _cryptoApi     = cryptoApi;
     _clusterClient = clusterClient;
     _hubNotifier   = hubNotifier;
     _pushManager   = pushManager;
 }
示例#2
0
 public CoinTrader(ICryptoApi cryptoApi, IClusterClient orleansClient, IHubNotifier hubNotifier, IPushManager pushManager)
 {
     _cryptoApi            = cryptoApi;
     _orleansClient        = orleansClient;
     _hubNotifier          = hubNotifier;
     _pushManager          = pushManager;
     _taskCompletionSource = new TaskCompletionSource <Budget>();
 }
示例#3
0
 public CoinTrader(ICryptoApi cryptoApi)
 {
     _cryptoApi            = cryptoApi;
     _taskCompletionSource = new TaskCompletionSource <Budget>();
     PriceUpdated          = new Subject <Ticker>();
     OrderUpdated          = new Subject <CryptoOrder>();
     TradeUpdated          = new Subject <Trade>();
 }
示例#4
0
 public CryptoHostedService(IOptions <EnvironmentConfig> options, IPushManager pushManager, ICryptoApi cryptoApi, IClusterClient clusterClient, IHubContext <ApplicationHub> hubContext, ITradersManager tradersManager)
 {
     _options        = options;
     _pushManager    = pushManager;
     _cryptoApi      = cryptoApi;
     _clusterClient  = clusterClient;
     _tradersManager = tradersManager;
     _hubNotifier    = new HubNotifier(hubContext);
     _cryptoApi.Initialize(options.Value.BittrexApiKey, options.Value.BittrexApiSecret, options.Value.TestMode, true);
 }
示例#5
0
 public OrdersController(ICryptoApi cryptoApi, IOptions <EnvironmentConfig> options)
 {
     _cryptoApi = cryptoApi;
     _cryptoApi.Initialize(options.Value.BittrexApiKey, options.Value.BittrexApiSecret, options.Value.TestMode);
 }
示例#6
0
 public TradersController(IOptions <EnvironmentConfig> options, IClusterClient clusterClient, ICryptoApi cryptoApi, ITradersManager tradersManager)
 {
     _clusterClient  = clusterClient;
     _tradersManager = tradersManager;
 }
示例#7
0
 public WalletController(ICryptoApi cryptoApi, IOptions <EnvironmentConfig> options, IPushManager pushManager)
 {
     _cryptoApi   = cryptoApi;
     _pushManager = pushManager;
     _cryptoApi.Initialize(options.Value.BittrexApiKey, options.Value.BittrexApiSecret, options.Value.TestMode);
 }
示例#8
0
 public BackTester(ICryptoApi cryptoApi)
 {
     _cryptoApi = cryptoApi;
 }