Current figures from an OptimToken guide
get_live_figuresGet the current value of a figure a reference quotes with a date.
Use this when a reference quotes a figure from an OptimToken guide
("measured on the 2026-10-25 OptimToken catalogue") and the answer needs
the current value: the Compute Savings Plan or reservation discount, the
gap between a flexible and a locked commitment, the ARM discount against
Intel and AMD, the share of LLM models with a batch rate. It fetches the
guide's figures file, rebuilt daily, and returns it as published.
Args:
guide: The guide slug, lowercase letters, digits and hyphens. Guides
with figures today: ``"savings-plans-vs-reserved-instances"``,
``"arm-against-x86"``, ``"batch-api-economics"``.
Returns ``{"document": {...}, "fetched_at": ..., "source": "live" |
"cached", "note": ...}``, plus ``cache_age_seconds`` when cached (six-hour
cache). ``document`` is the file unchanged: ``guide``, ``title``,
``url``, ``dataSource``, ``snapshotDate`` (the catalogue the figures come
from), ``dateModified`` and ``figures``, where discounts are fractions
(0.2743 is 27.4%) and each key names a median, a range or a count.
An unknown slug returns ``{"error", "available_guides", "suggestions"}``.
Any other failure (timeout, HTTP error, invalid JSON) returns
``{"error", "fallback"}``: the dated figure in the reference then stands,
quoted with its date.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| guide | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||