Beispiel #1
0
        static async Task RunAsync()
        {
            //UPDATE LOCALLY STORED 5m CANDLES, AND .CSV RECORDS:
            await HistoricalData.UpdateHistData();

            //INITIALIZE DATA, THEN CONNECT WEBSOCKET
            BtrexData.NewData();
            await BtrexWS.Connect();

            ConfigTraceLogging();

            //SUBSCRIBE TO DESIRED MARKETS, THEN START-DATA-UPDATES:
            await BtrexController.InitializeMarkets();

            //START DATA THREAD
            await BtrexData.StartDataUpdates();

            //START CALCS/STRATEGY WORK:
            BtrexController.StartWork();

            //START TRADING THREAD
            BtrexREST.TradeController.StartTrading();

            Console.WriteLine("\r\n\r\n-PRESS ENTER 3 TIMES TO EXIT-\r\n\r\n");
            Console.ReadLine();
            Console.ReadLine();
            Console.ReadLine();
            Environment.Exit(0);
        }
Beispiel #2
0
        static async Task RunAsync()
        {
            BtrexData.NewData();

            Console.Write("Connecting websocket1...");
            await websocket1.Connect();

            Console.WriteLine("DONE");
            Console.Write("Connecting websocket2...");
            await websocket2.Connect();

            Console.WriteLine("DONE");
            Console.Write("Connecting websocket3...");
            await websocket3.Connect();

            Console.WriteLine("DONE");

            await websocket1.SubscribeMarketsList(SubSpecificDeltas1.ToList());

            await websocket2.SubscribeMarketsList(SubSpecificDeltas2.ToList());

            await websocket3.SubscribeMarketsList(SubSpecificDeltas3.ToList());


            //START DATA THREAD
            await BtrexData.StartDataUpdates();



            Console.WriteLine("\r\n\r\n-PRESS ENTER 3 TIMES TO EXIT-\r\n\r\n");
            Console.ReadLine();
            Console.ReadLine();
            Console.ReadLine();
            Environment.Exit(0);
        }