syncCandles = async (logger, symbols) => {
  await Promise.all(
    symbols.map(async symbol => {
      const getCandles = async () => {
        await mongo.deleteAll(logger, 'trailing-trade-candles', {
          key: symbol
        });

        const symbolConfiguration = await getConfiguration(logger, symbol);

        const {
          candles: { interval, limit }
        } = symbolConfiguration;

        // Retrieve candles
        logger.info(
          { debug: true, function: 'candles', interval, limit },
          `Retrieving candles from API for ${symbol}`
        );

        const candles = await binance.client.candles({
          symbol,
          interval,
          limit
        });

        const operations = candles.map(candle => ({
          updateOne: {
            filter: {
              key: symbol,
              time: +candle.openTime,
              interval
            },
            update: {
              $set: {
                open: +candle.open,
                high: +candle.high,
                low: +candle.low,
                close: +candle.close,
                volume: +candle.volume
              }
            },
            upsert: true
          }
        }));

        await mongo.bulkWrite(logger, 'trailing-trade-candles', operations);
      };

      queue.execute(logger, symbol, {
        correlationId: uuidv4(),
        preprocessFn: getCandles,
        processFn: executeTrailingTrade
      });
    })
  );
}
Retrieve candles for symbols from Binance API

@param {*} logger
@param {string[]} symbols