Ejemplo n.º 1
0
        public async Task <IActionResult> Update([FromBody] LimitArbitrageStrategy4SettingsDTO dto)
        {
            try
            {
                string userId = this.User.Claims.FirstOrDefault(x => x.Type == ClaimTypes.NameIdentifier).Value;
                await this.repo.Update(dto, userId);

                return(Ok());
            }
            catch (Exception ex)
            {
                log.Log(ex);
                return(BadRequest());
            }
        }
Ejemplo n.º 2
0
        public LimitArbitrage4Strategy(LimitArbitrageStrategy4SettingsDTO settings,
                                       ISpotExchangeFacade exchangefacade1,
                                       ISpotExchangeFacade exchangefacade2,
                                       StrategyLogService strategyLogService,
                                       SemaphoreSlim baseSemaphore,
                                       SemaphoreSlim quoteSemaphore,
                                       SemaphoreSlim concurrentSemaphores)
        {
            this.IsRunning = false;
            this.Type      = StrategyType.LimitArbitrage4;

            this.settings        = settings;
            this.exchangefacade1 = exchangefacade1;
            this.exchangefacade2 = exchangefacade2;

            this.symbol = settings.Symbol;

            this.strategyLogService = strategyLogService;

            this.baseSemaphore        = baseSemaphore;
            this.quoteSemaphore       = quoteSemaphore;
            this.concurrentSemaphores = concurrentSemaphores;
            this.Name = this.settings.StrategyName;
        }