INNER CODE UNIT · JavaScript

executeAlive

dearvn/tradovate-trading-bot · agents/notification/index.js:65

const executeAlive = async logger => {
  await errorHandlerWrapper(logger, 'alive', async () => {
    const info = await getAccountInfo(logger);
    if (!info) return;

    await cache.set(
      'trailing_trade_common:account-info',
      JSON.stringify(info)
    );

    const text = `Account info refreshed: ${info.accounts ? info.accounts.length : 0} account(s)`;
    await slack.sendMessage(text);
    logger.info({ info }, 'Alive check completed');
  });
};

// ── Log cleanup ──────────────────────────────────────────────────────────────

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…