Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Prices

18.4. Prices — Tracking Prices

The same diff architecture, applied to numbers instead of content

This is a variant of 18.2 but focused on numeric values — tracking product prices, exchange rates, stock/crypto prices — the job alerts only when the price crosses a threshold or changes significantly from the last check.

A real example

/cron add "every 4h" "Check the price of product X on site Y. If the price drops more than 10% compared to the last check, alert immediately. If not, [SILENT]." --script check_price.py

Notes

  • Always set explicit thresholds (percentage change, absolute price level) instead of letting the agent decide what is “noteworthy” — with numeric data, clear thresholds are far more reliable than the model’s qualitative judgment.
  • Store the price history over time (not just the latest price) so you can detect trends, not just compare two adjacent points — useful later when combined with Data Analysis (17.5).
  • For financial prices (stocks, crypto), the calculation should be fully separated into a deterministic script (as per the principle in 17.4); use the LLM only for a brief interpretation, to avoid the model improvising or rounding important figures incorrectly.