Esempio n. 1
0
        public static async Task Run([TimerTrigger("0 * * * * *")] TimerInfo myTimer, TraceWriter log)
        {
            try
            {
                log.Info("Starting processing...");

                // Call the Bittrex Trade manager with the strategy of our choosing.
                var manager = new GenericTradeManager(
                    new BinanceApi(),
                    new TheScalper(),
                    null, (a) => log.Info(a)
                    );

                // Call the process method to start processing the current situation.
                await manager.UpdateRunningTrades();

                log.Info("Done...");
            }
            catch (Exception ex)
            {
                // If anything goes wrong log an error to Azure.
                log.Error(ex.Message + ex.StackTrace);
            }
        }