syncAll = async logger => {
  logger.info('Start syncing the bot...');

  // reset candles and streams before restart to remove any unused symbol
  await refreshCandles(logger);

  // Retrieve account info from API
  await getAccountInfoFromAPI(logger);

  // Get configuration
  const globalConfiguration = await getGlobalConfiguration(logger);

  // Retrieve list of monitoring symbols
  const { symbols } = globalConfiguration;

  logger.info({ symbols }, 'Retrieved symbols');

  // Start job for all symbols to ensure nothing will be executed unless all data retrieved
  await Promise.all(symbols.map(symbol => queue.prepareJob(logger, symbol)));

  await setupExchangeSymbols(logger);
  await setupWebsockets(logger, symbols);

  await syncCandles(logger, symbols);
  await syncATHCandles(logger, symbols);
  await syncOpenOrders(logger, symbols);
  await syncDatabaseOrders(logger);

  // Complete job for all symbols when all data has been retrieved
  await Promise.all(symbols.map(symbol => queue.completeJob(logger, symbol)));
}
Setup web socket for retrieving candles

@param {*} logger