INNER CODE UNIT · TypeScript

low24h

alexanderwanyoike/the0 · example-bots/typescript-price-alerts/main.ts:195

  const low24h = Math.min(...state.priceHistory, newPrice);

  return {
    symbol,
    value: Math.round(newPrice * 100) / 100,
    change_pct: Math.round(changePct * 1000) / 1000,
    high_24h: Math.round(high24h * 100) / 100,
    low_24h: Math.round(low24h * 100) / 100,
  };
}

/**
 * Check if alert conditions are met
 */
function checkAlertConditions(
  state: BotState,
  priceData: { value: number; change_pct: number },
  threshold: number,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…