veriql Forecast Desk
Time now, UTC

API

The forecasts on this site are free to read from a plain JSON API. Start with the call below, then use the endpoint table and the full reference.

Quick start

Ask for the latest Bitcoin forecast

curl https://forecast.veriql.app/v1/latest/BTC

You get JSON back

{
  "api": "v1",
  "generated_at": 1830297900,
  "credits": [
    "Price data: Bitstamp"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "asset": "BTC",
  "name": "Bitcoin",
  "horizons": {
    "24h": {
      "start_price": 97000,
      "range90": {
        "low": 93993,
        "high": 100104,
        "low_pct": -3.1,
        "high_pct": 3.2
      },
      "ends_at": 1830384000,
      "status": "live"
    }
  }
}

Example response, trimmed to a few fields. Live values differ.

Endpoints

Every route is a GET that answers JSON. Cache is how many seconds an answer may be kept before you ask again.

PathWhat it returnsCache (seconds)
/v1/nowLive price of every asset, and each open window's lowest and highest price so far.60
/v1/candles/{asset}The 5-minute candles of one market, complete bars only, about the last two days.60
/v1/latestThe latest forecast of every asset that has one.300
/v1/latest/{asset}The latest forecast of one asset: its ranges, touch chances and record.300
/v1/hourly/{asset}The 24 hourly ranges of the day's forecast.300
/v1/touch/{asset}/{h}The touch sample of one crypto forecast, to work out touch chances at any level.300
/v1/scorecardHow the ranges held, per asset and window, over the last 365 days.3600
/v1/evolutionWhat changed in the models and how it was tested, newest first.3600
/v1/recordThe tools' own record: how many ranges were checked and how often they held.3600
/v1/factsToday's short facts about the forecasts, each with its source.3600
/v1/contextFacts about the past: the 52-week range, the averages and the recent swings.3600
/v1/scheduleThe gold and silver trading hours.3600
/v1/healthWhether the forecasts you read are being kept up to date.300
/v1/sealsThe newest seal of the record.3600
/v1/seals/{day}The seals written on one UTC day.3600

Free to use

Credit the sources

Show the credits from the credits field of any answer you use, beside the forecast: Price data: Bitstamp, and Metal prices: gold-api.com for gold and silver. Keep the line Forecast, not financial advice. with it.

How the API changes

Everything here lives under /v1. New fields and new routes can be added there, so ignore a field you do not know. A change that would break a reader gets a new version in the path and never changes /v1.

To put the forecast on your own page without writing code, use the kit. Embed a widget

Full reference

veriql forecast public API, v1

Forecast, not financial advice. The API shows forecast ranges for crypto and metal prices and the record of how those ranges held. It gives no buy or sell calls.

The envelope

Every payload, errors included, carries the envelope:

Table: Field, Value (5 rows)
Field Value
api always "v1"
generated_at when the producer wrote the object, unix seconds UTC (errors have none: nothing produced them; the two seal routes have none either, because a seal carries its own sealed_at)
credits the price sources of the payload: "Price data: Bitstamp" for crypto, "Metal prices: gold-api.com" for gold and silver, both for a payload about every asset
disclaimer always "Forecast, not financial advice."
labels the asset's labels as keys (see below); [] for a payload about every asset

Labels

Table: Key, Words (3 rows)
Key Words
in_testing In testing
beta Beta
thin_data Thin data

Assets

The asset names are case-sensitive.

Table: Asset, Name, Class, Labels (9 rows)
Asset Name Class Labels
BTC Bitcoin crypto none
ETH Ether crypto none
XRP XRP crypto none
SOL Solana crypto none
NEAR NEAR crypto thin_data
XAU Gold metal beta
XAG Silver metal beta
XAUXAG Gold/silver ratio ratio beta
OIL Oil oil none

OIL is listed but has no live price feed yet (copy: "Oil: tested, live soon. We tested oil privately. No free live oil price feed allows this use yet, so oil shows no numbers."), so its routes answer 503 not_ready, and /v1/latest has no OIL entry.

The gold/silver ratio (XAUXAG)

XAUXAG is the price of gold divided by the price of silver, on the metals' hours and from the same source. Its price is a plain number: show it with no $ and two decimals (for example 84.50). Nothing about it is a dollar amount.

A ratio price is made only from a gold price and a silver price that gold-api.com stamped no more than 60 seconds apart. When the newest pair is further apart than that, the newest ratio stays as it was, and its ts (the later of the two stamps) does not move. A ratio price turns out of date 840 seconds after its ts (price.stale is true, counted in open-market seconds), which is the 900 second limit the metals have, less the 60 seconds a pair may be apart. The same limit makes a ratio forecast stale.

Its credit is "Metal prices: gold-api.com", the same as gold and silver. It follows the metal market hours, so it has no forecast while the market is closed.

show is a display flag. A ratio is recorded and served whether or not it is shown: /v1/latest/XAUXAG and /v1/hourly/XAUXAG answer as they do for any asset (/v1/hourly answers as it does for gold: there is no hourly file). The listings follow the flag: /v1/now, the scorecard and the challenger list include XAUXAG only once it is shown.

In plain words

The fields below are defined in the tables of each route. These sentences say the same things in plain words. The "How to read this" page on the site quotes them word for word, and a test checks that every one of them is here.

Status words

Each forecast horizon has a status. A range is shown only when it is live.

Table: Status, Words (8 rows)
Status Words
live Live
warming_up Warming up: not enough data yet to show a range.
thin_data Thin data: little trading history for this asset.
market_closed Market closed.
paused Paused.
stale Out of date, so no range is shown.
coming_soon Coming soon.
testing_hidden In testing: not shown yet.

stale has two true causes, and the entry says which in stale_cause (below): price when the price the range starts from did not arrive, state when the forecast itself could not be made or updated. A client words stale by that field, and says "the price at this window's start did not arrive" only for price. A gold or silver entry that is stale while checks_done is still below checks_needed is, for the reader, a forecast that is still warming up: show "checks_done of checks_needed".

Endpoints

GET /v1/now

The live price of every asset, and for each forecast window that is open now, the lowest and highest price so far. Cache: Cache-Control: public, max-age=60. The Worker rewrites the object every minute, so it is at most a minute old plus the cache.

Fields: the envelope, plus assets, keyed by asset: {price, windows}.

Table: Field, Meaning (9 rows)
Field Meaning
price {value, ts, source, stale}, or null when no price has been seen for the asset
price.value crypto: the close of the newest stored 1-minute Bitstamp candle. Gold and silver: the newest gold-api price. The gold/silver ratio: the newest gold price divided by the newest silver price. No other source is used
price.ts when it was observed: crypto, the end of that candle's minute; metals, the updated_at gold-api reported
price.source the credit for the source
price.stale true when the price is older than the limit: 300 seconds for crypto, and for metals the same limit as a stale metal forecast, counted in open-market time (the gold/silver ratio: 840 seconds, see "The gold/silver ratio")
windows {"24h", "8h"}, each {origin, ends_at, low, high, until} or null
windows.<h>.origin, ends_at the window of the newest published forecast whose window contains now: origin <= now < ends_at, and ends_at - origin is the horizon
windows.<h>.low, high the lowest and highest price from origin to until
windows.<h>.until the end of the newest minute that low and high include; never after ends_at

How low, high and until are worked out. They use the data and the rule the nightly check uses to record a window. Crypto: the highest high and the lowest low of the traded 1-minute Bitstamp candles (volume above 0) that start at or after origin and before until. Gold and silver: the highest and lowest of the minute prices the poll stored, one price per minute (the last of that minute), from origin to until. A minute counts once it is final and it has arrived. Final: Bitstamp publishes a candle about a minute after it ends, so a minute counts only after now - 60. Arrived: until is the end of the newest minute the Worker actually received (for gold and silver, a minute counts once a poll snapshot from a later minute has arrived, because the last snapshot of a minute is the one that counts), but never later than floor((now - 60) / 60) * 60 (seconds) and never after ends_at. A minute that has not arrived is asked for again the next minute, so until stops moving while the source is late, and the price turns stale. A so-far value is a value of the minutes already final and received: low and high equal the recorded lo and hi computed over [origin, until). The recorded lo and hi of a finished window also include the minutes from until to ends_at, up to two of them (the minute still open and the one inside the 60 second lag), so they can be a little wider than the last /v1/now value of that window. Once a window has ended, read its result, not its so-far value.

A window is null when no forecast has been published for the window that contains now, when no minute of it has been seen yet, or (gold and silver) when the market is closed. A window of a forecast other than the one /v1/latest shows is never reported: origin is the shown forecast's ends_at minus its horizon. A window is reported when its forecast is published, even if /v1/latest shows that asset as stale or without a number: price, low and high are observed prices, not forecasts. After a failed read of the price source the last good numbers stay and the price turns stale once it is older than the limit; a number is never half written. This feed carries no candle list; the closed 5-minute bars are at /v1/candles/{asset}.

Example response (48 lines)
{
  "api": "v1",
  "generated_at": 1830340833,
  "credits": [
    "Price data: Bitstamp",
    "Metal prices: gold-api.com"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [],
  "assets": {
    "BTC": {
      "price": {
        "value": 100420.5,
        "ts": 1830340740,
        "source": "Price data: Bitstamp",
        "stale": false
      },
      "windows": {
        "24h": {
          "origin": 1830297600,
          "ends_at": 1830384000,
          "low": 99100.0,
          "high": 101650.25,
          "until": 1830340740
        },
        "8h": {
          "origin": 1830326400,
          "ends_at": 1830355200,
          "low": 99870.0,
          "high": 101020.5,
          "until": 1830340740
        }
      }
    },
    "XAU": {
      "price": {
        "value": 2651.4,
        "ts": 1830340821,
        "source": "Metal prices: gold-api.com",
        "stale": false
      },
      "windows": {
        "24h": null,
        "8h": null
      }
    }
  }
}

GET /v1/candles/{asset}

The 5-minute candles of one market: complete bars only, oldest first, about the last two days. The forming bar is not included; build it from /v1/now. asset is one of BTC, ETH, XRP, SOL, NEAR, XAU, XAG or XAUXAG; oil has no live feed and, like any other symbol, answers 404 unknown_asset. A market whose first bar is not written yet answers 503 not_ready. Cache: Cache-Control: public, max-age=60. The Worker adds the bars of one market every five minutes, so a bar usually appears within six minutes after it closed (crypto); a tick busy with a forecast job or the hourly seal waits, and the market takes its next turn five minutes later. Metal and ratio bars are built one minute (now.lag_s) after the bar closed, so a late price still lands in it; a market whose turn falls in that minute builds the bar at its next turn, up to ten minutes after the close.

Freshness: judge it by the last bar's t plus bar_s compared with now, not by generated_at. Each tick reads only a few rows per market, so after a cold start or an outage the newest bar can be hours old while the older bars fill in, even though generated_at is recent.

Fields: the envelope, plus asset, bar_s (the seconds in a bar, always 300) and bars, a list of [t, o, h, l, c]: t is the bar's start (a multiple of bar_s, ascending, never repeated), then the open, high, low and close.

{
  "api": "v1",
  "generated_at": 1799928300,
  "credits": [
    "Price data: Bitstamp"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [
    "in_testing"
  ],
  "asset": "BTC",
  "bar_s": 300,
  "bars": [
    [1799927700, 64210.5, 64233.1, 64198.0, 64225.4],
    [1799928000, 64225.4, 64240.0, 64210.2, 64219.9]
  ]
}

GET /v1/latest

The latest forecast of every asset that has one. Cache: Cache-Control: public, max-age=300 (the widget's refresh floor).

Fields: the envelope, plus assets, keyed by asset: {name, labels, horizons}. horizons holds 24h and/or 8h, each a horizon entry as in /v1/latest/{asset}.

Example response (262 lines)
{
  "api": "v1",
  "generated_at": 1830297900,
  "credits": [
    "Price data: Bitstamp",
    "Metal prices: gold-api.com"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [],
  "assets": {
    "BTC": {
      "name": "Bitcoin",
      "labels": [
        "in_testing"
      ],
      "horizons": {
        "24h": {
          "start_price": 97000.0,
          "range90": {
            "low": 93993.0,
            "high": 100104.0,
            "low_pct": -3.1,
            "high_pct": 3.2
          },
          "range80": {
            "low": 94672.0,
            "high": 99425.0,
            "low_pct": -2.4,
            "high_pct": 2.5
          },
          "ends_at": 1830384000,
          "status": "live",
          "fit_stale": false,
          "touch": [
            {
              "level": 0.01,
              "side": "up",
              "chance": 0.62,
              "chance_text": "62%",
              "beyond_end": 0.31,
              "beyond_end_text": "31%"
            },
            {
              "level": 0.01,
              "side": "dn",
              "chance": 0.58,
              "chance_text": "58%",
              "beyond_end": 0.29,
              "beyond_end_text": "29%"
            },
            {
              "level": 0.13,
              "side": "up",
              "chance": 0.0,
              "chance_text": "under 1 in 4000",
              "beyond_end": 0.0,
              "beyond_end_text": "under 1 in 4000"
            }
          ],
          "record": {
            "checks": 212,
            "held90": 0.896,
            "held80": 0.792
          },
          "closed_until": null,
          "why": {
            "vs_usual": {
              "ratio": 1.0091,
              "basis_days": 365,
              "n": 317
            },
            "drivers": [
              {
                "key": "xw",
                "value": -7.0914,
                "usual": -7.1717,
                "effect": 0.01786
              },
              {
                "key": "xm",
                "value": -6.7449,
                "usual": -7.0626,
                "effect": -0.00898
              },
              {
                "key": "xd",
                "value": -7.2637,
                "usual": -7.2406,
                "effect": -0.00561
              },
              {
                "key": "wk",
                "value": 1,
                "usual": 0,
                "effect": -0.00264
              },
              {
                "key": "coverage",
                "value": 1.007,
                "usual": 1.0065,
                "effect": 0.00047
              }
            ]
          }
        },
        "8h": {
          "start_price": 97000.0,
          "range90": {
            "low": 93993.0,
            "high": 100104.0,
            "low_pct": -3.1,
            "high_pct": 3.2
          },
          "range80": {
            "low": 94672.0,
            "high": 99425.0,
            "low_pct": -2.4,
            "high_pct": 2.5
          },
          "ends_at": 1830326400,
          "status": "live",
          "fit_stale": false,
          "touch": [
            {
              "level": 0.01,
              "side": "up",
              "chance": 0.62,
              "chance_text": "62%",
              "beyond_end": 0.31,
              "beyond_end_text": "31%"
            },
            {
              "level": 0.01,
              "side": "dn",
              "chance": 0.58,
              "chance_text": "58%",
              "beyond_end": 0.29,
              "beyond_end_text": "29%"
            },
            {
              "level": 0.13,
              "side": "up",
              "chance": 0.0,
              "chance_text": "under 1 in 4000",
              "beyond_end": 0.0,
              "beyond_end_text": "under 1 in 4000"
            }
          ],
          "record": {
            "checks": 212,
            "held90": 0.896,
            "held80": 0.792
          },
          "closed_until": null,
          "why": {
            "vs_usual": {
              "ratio": 0.88,
              "basis_days": 365,
              "n": 1047
            },
            "drivers": [
              {
                "key": "x3",
                "value": -8.7908,
                "usual": -8.3165,
                "effect": -0.09722
              },
              {
                "key": "x1",
                "value": -8.7819,
                "usual": -8.3781,
                "effect": -0.01398
              },
              {
                "key": "j2",
                "value": 1,
                "usual": 0,
                "effect": -0.01018
              },
              {
                "key": "x21",
                "value": -8.2875,
                "usual": -8.2575,
                "effect": -0.00648
              },
              {
                "key": "x90",
                "value": -7.856,
                "usual": -8.1491,
                "effect": -0.00529
              },
              {
                "key": "wk",
                "value": 1,
                "usual": 0,
                "effect": 0.00431
              },
              {
                "key": "coverage",
                "value": 0.9905,
                "usual": 0.9886,
                "effect": 0.00196
              },
              {
                "key": "j1",
                "value": 0,
                "usual": 0,
                "effect": 0
              }
            ]
          }
        }
      }
    },
    "XAU": {
      "name": "Gold",
      "labels": [
        "in_testing",
        "beta"
      ],
      "horizons": {
        "24h": {
          "start_price": 2650.5,
          "range90": {
            "low": 2618.69,
            "high": 2684.96,
            "low_pct": -1.2,
            "high_pct": 1.3
          },
          "range80": {
            "low": 2626.65,
            "high": 2677.01,
            "low_pct": -0.9,
            "high_pct": 1.0
          },
          "ends_at": 1830384000,
          "status": "live",
          "fit_stale": false,
          "touch": [],
          "record": {
            "checks": 40,
            "held90": null,
            "held80": null
          },
          "closed_until": null,
          "why": {
            "vs_usual": null,
            "drivers": null
          },
          "market_open": true,
          "reopen_jump": {
            "weekends": 52,
            "median_pct": 0.31,
            "p90_pct": 1.12
          },
          "checks_done": 44,
          "checks_needed": 30
        }
      }
    }
  }
}

GET /v1/latest/{asset}

One asset's latest forecast. Cache: Cache-Control: public, max-age=300. An asset not in the table above answers 404 unknown_asset.

Fields: the envelope, plus asset, name and horizons (24h and/or 8h). Each horizon entry:

Table: Field, Meaning (14 rows)
Field Meaning
start_price the price the range starts from (null unless live)
range90, range80 {low, high, low_pct, high_pct}: where the price is likely to end, 90% and 80% of the time; low and high are prices, low_pct and high_pct the moves from start_price in percent (null unless live)
ends_at when the range ends (null for a paused or closed entry)
status a status word (above)
fit_stale true when the model fit is older than usual
stale_cause only on an entry whose status is stale: price when no current price reached the publish (no price at its slot, or one older than the limit), state when the engine had no state to forecast from. The field is absent on every other status
touch [{level, side, chance, chance_text, beyond_end, beyond_end_text}]: the chance the price touches start_price moved by level (0.01 is 1%) up or dn (down) before ends_at; chance_text is the same as words. beyond_end is the chance the price ends the window beyond this level, always at most chance; beyond_end_text is the same as words. Empty for gold and silver for now
record {checks, held90, held80}: how many past ranges were checked and the share that held (null before the first check). One source for every asset: held90 and held80 are shares of these checks
closed_until metals: when a closed market reopens, else null
why {vs_usual, drivers}: why the 90% range is this size (below); both null unless live
market_open gold and silver only: the market is open now (null when unknown)
reopen_jump gold and silver only: {weekends, median_pct, p90_pct}, the size of past weekend reopen moves in percent, or null
checks_done gold and silver only: the count of checks the model itself uses to decide whether it shows a range (the larger of the main and the cold-start counts while the cold start is used), or null when it is not known. It is not record.checks, which counts the recorded live ranges
checks_needed gold and silver only: how many checks checks_done must reach before a range is shown. While checks_done is lower the status is warming_up (or stale, when the price or the state is missing at the same time), so a client can show "checks_done of checks_needed"

long: the gold/silver ratio's 30 and 90 day ranges

Only /v1/latest/XAUXAG has it, and only once the first long forecast is written; the field is optional, so a client that does not know it can ignore it. A long forecast is made once a day, in the first five minutes after 00:00 UTC, from the ratio's last price in the five minutes before 00:00, on a day the market is open at 00:00. It is a range of prices that the ratio is likely to end in 30 or 90 days later, not a single predicted price. long is {t, stale, windows}:

Table: Field, Meaning (3 rows)
Field Meaning
t the 00:00 UTC (unix seconds) of the newest long forecasts
stale true when t is more than five days before 00:00 UTC today
windows 30d and/or 90d, each as below

Each window: status (shown: the ranges are shown; cannot_tell: the past data did not support a range for this window, so there is none; removed: the live record fell short of its preregistered bar, so the range was taken off and stays off), start_price (the ratio price the ranges start from), ends_at, range90 and range80 ({low, high, low_pct, high_pct} as in a horizon entry, or null: a level that did not pass its past-data test has none), lean, checks (how many non-overlapping 30 or 90 day windows have been checked), next_due (when the next window ends, or null) and test (what the past-data test found: {since_year, n, levels} with each level's state, hit share and its lo and hi bounds, or null).

lean is {state, dir, hit, naive_hit, n, source, since_year}: a lean is a direction (dir, higher or lower, else null) that the ratio moved in, compared with a plain rule's hit rate (naive_hit). dir is set only when state is pass. source is history until 30 live checks exist, then live. A lean is not a range and not advice.

A removal shows in the record the night it fires (the nightly runs at 00:07 UTC) and reaches latest at the next 00:00 UTC, up to about a day later.

why: why the range is this size

Every width here is the 90% range's log-width, ln(high / low) of range90 (the same in log returns, so no price is needed). The usual values come from the forecasts this asset and horizon published on the shown chain over the 365 days before the nightly fit the forecast uses, walk-forward, with no look-ahead.

Example response (211 lines)
{
  "api": "v1",
  "generated_at": 1830297900,
  "credits": [
    "Price data: Bitstamp"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [
    "in_testing"
  ],
  "asset": "BTC",
  "name": "Bitcoin",
  "horizons": {
    "24h": {
      "start_price": 97000.0,
      "range90": {
        "low": 93993.0,
        "high": 100104.0,
        "low_pct": -3.1,
        "high_pct": 3.2
      },
      "range80": {
        "low": 94672.0,
        "high": 99425.0,
        "low_pct": -2.4,
        "high_pct": 2.5
      },
      "ends_at": 1830384000,
      "status": "live",
      "fit_stale": false,
      "touch": [
        {
          "level": 0.01,
          "side": "up",
          "chance": 0.62,
          "chance_text": "62%",
          "beyond_end": 0.31,
          "beyond_end_text": "31%"
        },
        {
          "level": 0.01,
          "side": "dn",
          "chance": 0.58,
          "chance_text": "58%",
          "beyond_end": 0.29,
          "beyond_end_text": "29%"
        },
        {
          "level": 0.13,
          "side": "up",
          "chance": 0.0,
          "chance_text": "under 1 in 4000",
          "beyond_end": 0.0,
          "beyond_end_text": "under 1 in 4000"
        }
      ],
      "record": {
        "checks": 212,
        "held90": 0.896,
        "held80": 0.792
      },
      "closed_until": null,
      "why": {
        "vs_usual": {
          "ratio": 1.0091,
          "basis_days": 365,
          "n": 317
        },
        "drivers": [
          {
            "key": "xw",
            "value": -7.0914,
            "usual": -7.1717,
            "effect": 0.01786
          },
          {
            "key": "xm",
            "value": -6.7449,
            "usual": -7.0626,
            "effect": -0.00898
          },
          {
            "key": "xd",
            "value": -7.2637,
            "usual": -7.2406,
            "effect": -0.00561
          },
          {
            "key": "wk",
            "value": 1,
            "usual": 0,
            "effect": -0.00264
          },
          {
            "key": "coverage",
            "value": 1.007,
            "usual": 1.0065,
            "effect": 0.00047
          }
        ]
      }
    },
    "8h": {
      "start_price": 97000.0,
      "range90": {
        "low": 93993.0,
        "high": 100104.0,
        "low_pct": -3.1,
        "high_pct": 3.2
      },
      "range80": {
        "low": 94672.0,
        "high": 99425.0,
        "low_pct": -2.4,
        "high_pct": 2.5
      },
      "ends_at": 1830326400,
      "status": "live",
      "fit_stale": false,
      "touch": [
        {
          "level": 0.01,
          "side": "up",
          "chance": 0.62,
          "chance_text": "62%",
          "beyond_end": 0.31,
          "beyond_end_text": "31%"
        },
        {
          "level": 0.01,
          "side": "dn",
          "chance": 0.58,
          "chance_text": "58%",
          "beyond_end": 0.29,
          "beyond_end_text": "29%"
        },
        {
          "level": 0.13,
          "side": "up",
          "chance": 0.0,
          "chance_text": "under 1 in 4000",
          "beyond_end": 0.0,
          "beyond_end_text": "under 1 in 4000"
        }
      ],
      "record": {
        "checks": 212,
        "held90": 0.896,
        "held80": 0.792
      },
      "closed_until": null,
      "why": {
        "vs_usual": {
          "ratio": 0.88,
          "basis_days": 365,
          "n": 1047
        },
        "drivers": [
          {
            "key": "x3",
            "value": -8.7908,
            "usual": -8.3165,
            "effect": -0.09722
          },
          {
            "key": "x1",
            "value": -8.7819,
            "usual": -8.3781,
            "effect": -0.01398
          },
          {
            "key": "j2",
            "value": 1,
            "usual": 0,
            "effect": -0.01018
          },
          {
            "key": "x21",
            "value": -8.2875,
            "usual": -8.2575,
            "effect": -0.00648
          },
          {
            "key": "x90",
            "value": -7.856,
            "usual": -8.1491,
            "effect": -0.00529
          },
          {
            "key": "wk",
            "value": 1,
            "usual": 0,
            "effect": 0.00431
          },
          {
            "key": "coverage",
            "value": 0.9905,
            "usual": 0.9886,
            "effect": 0.00196
          },
          {
            "key": "j1",
            "value": 0,
            "usual": 0,
            "effect": 0
          }
        ]
      }
    }
  }
}

A closed metal market:

Example response (43 lines)
{
  "api": "v1",
  "generated_at": 1830297900,
  "credits": [
    "Metal prices: gold-api.com"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [
    "in_testing",
    "beta"
  ],
  "asset": "XAU",
  "name": "Gold",
  "horizons": {
    "24h": {
      "start_price": null,
      "range90": null,
      "range80": null,
      "ends_at": null,
      "status": "market_closed",
      "fit_stale": false,
      "touch": [],
      "record": {
        "checks": 40,
        "held90": null,
        "held80": null
      },
      "closed_until": 1830459600,
      "why": {
        "vs_usual": null,
        "drivers": null
      },
      "market_open": false,
      "reopen_jump": {
        "weekends": 52,
        "median_pct": 0.31,
        "p90_pct": 1.12
      },
      "checks_done": 44,
      "checks_needed": 30
    }
  }
}

GET /v1/hourly/{asset}

The 24 hourly ranges of the 00:00 UTC forecast: where the price is likely to be at the end of each hour. Cache: Cache-Control: public, max-age=300.

Fields: the envelope, plus asset, origin (the 00:00 UTC start), start_price and hours, 24 entries of {hour, t, range90, range80} (hour 1 to 24 after origin, t the end of that hour).

Example response (400 lines)
{
  "api": "v1",
  "generated_at": 1830297900,
  "credits": [
    "Price data: Bitstamp"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [
    "in_testing"
  ],
  "asset": "BTC",
  "origin": 1830297600,
  "start_price": 97000.0,
  "hours": [
    {
      "hour": 1,
      "t": 1830301200,
      "range90": {
        "low": 96388.9,
        "high": 97630.5,
        "low_pct": -0.63,
        "high_pct": 0.65
      },
      "range80": {
        "low": 96524.7,
        "high": 97494.7,
        "low_pct": -0.49,
        "high_pct": 0.51
      }
    },
    {
      "hour": 2,
      "t": 1830304800,
      "range90": {
        "low": 96136.7,
        "high": 97892.4,
        "low_pct": -0.89,
        "high_pct": 0.92
      },
      "range80": {
        "low": 96330.7,
        "high": 97698.4,
        "low_pct": -0.69,
        "high_pct": 0.72
      }
    },
    {
      "hour": 3,
      "t": 1830308400,
      "range90": {
        "low": 95933.0,
        "high": 98096.1,
        "low_pct": -1.1,
        "high_pct": 1.13
      },
      "range80": {
        "low": 96175.5,
        "high": 97853.6,
        "low_pct": -0.85,
        "high_pct": 0.88
      }
    },
    {
      "hour": 4,
      "t": 1830312000,
      "range90": {
        "low": 95768.1,
        "high": 98270.7,
        "low_pct": -1.27,
        "high_pct": 1.31
      },
      "range80": {
        "low": 96049.4,
        "high": 97989.4,
        "low_pct": -0.98,
        "high_pct": 1.02
      }
    },
    {
      "hour": 5,
      "t": 1830315600,
      "range90": {
        "low": 95632.3,
        "high": 98416.2,
        "low_pct": -1.41,
        "high_pct": 1.46
      },
      "range80": {
        "low": 95933.0,
        "high": 98105.8,
        "low_pct": -1.1,
        "high_pct": 1.14
      }
    },
    {
      "hour": 6,
      "t": 1830319200,
      "range90": {
        "low": 95496.5,
        "high": 98552.0,
        "low_pct": -1.55,
        "high_pct": 1.6
      },
      "range80": {
        "low": 95836.0,
        "high": 98212.5,
        "low_pct": -1.2,
        "high_pct": 1.25
      }
    },
    {
      "hour": 7,
      "t": 1830322800,
      "range90": {
        "low": 95380.1,
        "high": 98678.1,
        "low_pct": -1.67,
        "high_pct": 1.73
      },
      "range80": {
        "low": 95739.0,
        "high": 98309.5,
        "low_pct": -1.3,
        "high_pct": 1.35
      }
    },
    {
      "hour": 8,
      "t": 1830326400,
      "range90": {
        "low": 95263.7,
        "high": 98794.5,
        "low_pct": -1.79,
        "high_pct": 1.85
      },
      "range80": {
        "low": 95651.7,
        "high": 98396.8,
        "low_pct": -1.39,
        "high_pct": 1.44
      }
    },
    {
      "hour": 9,
      "t": 1830330000,
      "range90": {
        "low": 95157.0,
        "high": 98901.2,
        "low_pct": -1.9,
        "high_pct": 1.96
      },
      "range80": {
        "low": 95574.1,
        "high": 98484.1,
        "low_pct": -1.47,
        "high_pct": 1.53
      }
    },
    {
      "hour": 10,
      "t": 1830333600,
      "range90": {
        "low": 95060.0,
        "high": 99007.9,
        "low_pct": -2.0,
        "high_pct": 2.07
      },
      "range80": {
        "low": 95496.5,
        "high": 98561.7,
        "low_pct": -1.55,
        "high_pct": 1.61
      }
    },
    {
      "hour": 11,
      "t": 1830337200,
      "range90": {
        "low": 94963.0,
        "high": 99104.9,
        "low_pct": -2.1,
        "high_pct": 2.17
      },
      "range80": {
        "low": 95428.6,
        "high": 98639.3,
        "low_pct": -1.62,
        "high_pct": 1.69
      }
    },
    {
      "hour": 12,
      "t": 1830340800,
      "range90": {
        "low": 94875.7,
        "high": 99192.2,
        "low_pct": -2.19,
        "high_pct": 2.26
      },
      "range80": {
        "low": 95351.0,
        "high": 98716.9,
        "low_pct": -1.7,
        "high_pct": 1.77
      }
    },
    {
      "hour": 13,
      "t": 1830344400,
      "range90": {
        "low": 94788.4,
        "high": 99289.2,
        "low_pct": -2.28,
        "high_pct": 2.36
      },
      "range80": {
        "low": 95283.1,
        "high": 98784.8,
        "low_pct": -1.77,
        "high_pct": 1.84
      }
    },
    {
      "hour": 14,
      "t": 1830348000,
      "range90": {
        "low": 94701.1,
        "high": 99366.8,
        "low_pct": -2.37,
        "high_pct": 2.44
      },
      "range80": {
        "low": 95224.9,
        "high": 98852.7,
        "low_pct": -1.83,
        "high_pct": 1.91
      }
    },
    {
      "hour": 15,
      "t": 1830351600,
      "range90": {
        "low": 94623.5,
        "high": 99454.1,
        "low_pct": -2.45,
        "high_pct": 2.53
      },
      "range80": {
        "low": 95157.0,
        "high": 98920.6,
        "low_pct": -1.9,
        "high_pct": 1.98
      }
    },
    {
      "hour": 16,
      "t": 1830355200,
      "range90": {
        "low": 94545.9,
        "high": 99531.7,
        "low_pct": -2.53,
        "high_pct": 2.61
      },
      "range80": {
        "low": 95098.8,
        "high": 98978.8,
        "low_pct": -1.96,
        "high_pct": 2.04
      }
    },
    {
      "hour": 17,
      "t": 1830358800,
      "range90": {
        "low": 94468.3,
        "high": 99609.3,
        "low_pct": -2.61,
        "high_pct": 2.69
      },
      "range80": {
        "low": 95040.6,
        "high": 99037.0,
        "low_pct": -2.02,
        "high_pct": 2.1
      }
    },
    {
      "hour": 18,
      "t": 1830362400,
      "range90": {
        "low": 94400.4,
        "high": 99686.9,
        "low_pct": -2.68,
        "high_pct": 2.77
      },
      "range80": {
        "low": 94982.4,
        "high": 99104.9,
        "low_pct": -2.08,
        "high_pct": 2.17
      }
    },
    {
      "hour": 19,
      "t": 1830366000,
      "range90": {
        "low": 94322.8,
        "high": 99764.5,
        "low_pct": -2.76,
        "high_pct": 2.85
      },
      "range80": {
        "low": 94924.2,
        "high": 99153.4,
        "low_pct": -2.14,
        "high_pct": 2.22
      }
    },
    {
      "hour": 20,
      "t": 1830369600,
      "range90": {
        "low": 94254.9,
        "high": 99832.4,
        "low_pct": -2.83,
        "high_pct": 2.92
      },
      "range80": {
        "low": 94875.7,
        "high": 99211.6,
        "low_pct": -2.19,
        "high_pct": 2.28
      }
    },
    {
      "hour": 21,
      "t": 1830373200,
      "range90": {
        "low": 94187.0,
        "high": 99900.3,
        "low_pct": -2.9,
        "high_pct": 2.99
      },
      "range80": {
        "low": 94827.2,
        "high": 99269.8,
        "low_pct": -2.24,
        "high_pct": 2.34
      }
    },
    {
      "hour": 22,
      "t": 1830376800,
      "range90": {
        "low": 94119.1,
        "high": 99968.2,
        "low_pct": -2.97,
        "high_pct": 3.06
      },
      "range80": {
        "low": 94769.0,
        "high": 99318.3,
        "low_pct": -2.3,
        "high_pct": 2.39
      }
    },
    {
      "hour": 23,
      "t": 1830380400,
      "range90": {
        "low": 94060.9,
        "high": 100036.1,
        "low_pct": -3.03,
        "high_pct": 3.13
      },
      "range80": {
        "low": 94720.5,
        "high": 99376.5,
        "low_pct": -2.35,
        "high_pct": 2.45
      }
    },
    {
      "hour": 24,
      "t": 1830384000,
      "range90": {
        "low": 93993.0,
        "high": 100104.0,
        "low_pct": -3.1,
        "high_pct": 3.2
      },
      "range80": {
        "low": 94672.0,
        "high": 99425.0,
        "low_pct": -2.4,
        "high_pct": 2.5
      }
    }
  ]
}

GET /v1/touch/{asset}/{h}

The touch sample of one crypto forecast, for a client that computes its own touch chances at any level. h is 24h or 8h; anything else answers 400 bad_horizon. Cache: Cache-Control: public, max-age=300.

Fields: the envelope, plus asset, horizon, t (the start), ends_at, p0 (the start price), sigma_now (the forecast volatility over the horizon, as a log-return), n (the sample size) and samples {e_up, e_dn, z}: for each past case, how far the price went up, how far it went down and where it ended, measured against the volatility of that forecast. The chances come from them.

Optional from_now, present only when the asset's hourly view is ready and at least one part passed its history test: share (24 numbers, the hour-by-hour split of the window that the hourly bands use), chances and ranges (whether each part passed its history test and is not switched off) and off ({chances?, ranges?}, the YYYY-MM-DD date a part was switched off; left out when no part is). The flags show which parts passed their history test.

{
  "api": "v1",
  "generated_at": 1830297900,
  "credits": [
    "Price data: Bitstamp"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [
    "in_testing"
  ],
  "asset": "BTC",
  "horizon": "24h",
  "t": 1830297600,
  "ends_at": 1830384000,
  "p0": 97000.0,
  "sigma_now": 0.0188,
  "n": 4,
  "samples": {
    "e_up": [
      0.41,
      1.02,
      2.37,
      0.12
    ],
    "e_dn": [
      0.88,
      0.05,
      1.71,
      0.64
    ],
    "z": [
      0.3,
      -1.2,
      0.7,
      -0.1
    ]
  }
}

GET /v1/scorecard

How the ranges did against their targets, per asset and horizon, over the last 365 days; and the challenger models scored beside them. Updated nightly. Cache: Cache-Control: public, max-age=3600.

Fields: the envelope, plus:

Example response (285 lines)
{
  "api": "v1",
  "generated_at": 1830297900,
  "credits": [
    "Price data: Bitstamp",
    "Metal prices: gold-api.com"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [],
  "card": {
    "BTC": {
      "24h": {
        "n": 40,
        "N": 330,
        "window": {
          "start": 1798761600,
          "end": 1830297600
        },
        "held90": {
          "count": 36,
          "share": 0.9,
          "range": [
            31,
            39
          ]
        },
        "held80": {
          "count": 31,
          "share": 0.775,
          "range": [
            27,
            36
          ]
        },
        "misses": {
          "90": {
            "lo": 2,
            "hi": 2
          },
          "80": {
            "lo": 5,
            "hi": 4
          }
        },
        "thirds": {
          "calm": {
            "n": 13,
            "held90": 0.92,
            "held80": 0.77,
            "misses": {
              "90": {
                "lo": 0,
                "hi": 0
              },
              "80": {
                "lo": 0,
                "hi": 0
              }
            }
          },
          "medium": {
            "n": 13,
            "held90": 0.92,
            "held80": 0.77,
            "misses": {
              "90": {
                "lo": 0,
                "hi": 0
              },
              "80": {
                "lo": 0,
                "hi": 0
              }
            }
          },
          "wild": {
            "n": 13,
            "held90": 0.92,
            "held80": 0.77,
            "misses": {
              "90": {
                "lo": 0,
                "hi": 0
              },
              "80": {
                "lo": 0,
                "hi": 0
              }
            }
          }
        },
        "T1": {
          "text": "not enough checks yet (40 of 330)",
          "n": 40,
          "N": 330,
          "pass": null
        },
        "T2": {
          "text": "not enough checks yet (40 of 330)",
          "n": 40,
          "N": 330,
          "pass": null
        },
        "T3": {
          "text": "not enough checks yet (40 of 330)",
          "n": 40,
          "N": 330,
          "pass": null
        },
        "T4": {
          "text": "not enough checks yet (40 of 330)",
          "n": 40,
          "N": 330,
          "pass": null
        },
        "T5": {
          "text": "not enough checks yet (40 of 330)",
          "n": 40,
          "N": 330,
          "pass": null
        },
        "T6": {
          "text": "not enough checks yet (40 of 330)",
          "n": 40,
          "N": 330,
          "pass": null
        },
        "touch_bins": [
          {
            "p_lo": 0.0,
            "p_hi": 0.1,
            "checks": 0,
            "happened": 0
          },
          {
            "p_lo": 0.1,
            "p_hi": 0.2,
            "checks": 0,
            "happened": 0
          },
          {
            "p_lo": 0.2,
            "p_hi": 0.3,
            "checks": 0,
            "happened": 0
          },
          {
            "p_lo": 0.3,
            "p_hi": 0.4,
            "checks": 0,
            "happened": 0
          },
          {
            "p_lo": 0.4,
            "p_hi": 0.5,
            "checks": 0,
            "happened": 0
          },
          {
            "p_lo": 0.5,
            "p_hi": 0.6,
            "checks": 0,
            "happened": 0
          },
          {
            "p_lo": 0.6,
            "p_hi": 0.7,
            "checks": 0,
            "happened": 0
          },
          {
            "p_lo": 0.7,
            "p_hi": 0.8,
            "checks": 0,
            "happened": 0
          },
          {
            "p_lo": 0.8,
            "p_hi": 0.9,
            "checks": 0,
            "happened": 0
          },
          {
            "p_lo": 0.9,
            "p_hi": 1.0,
            "checks": 0,
            "happened": 0
          }
        ],
        "winkler": {
          "90": {
            "main": null,
            "ewma": null,
            "ratio_ewma": null,
            "naive": null,
            "ratio_naive": null
          },
          "80": {
            "main": null,
            "ewma": null,
            "ratio_ewma": null,
            "naive": null,
            "ratio_naive": null
          }
        },
        "stale_share": 0.05,
        "stale_hidden": 0,
        "backtest": {
          "90": {
            "e": {
              "lo": {
                "e": 1.0,
                "alarm": false
              },
              "hi": {
                "e": 1.0,
                "alarm": false
              }
            },
            "kupiec_p": 0.41,
            "dq_p": null
          },
          "80": {
            "e": {
              "lo": {
                "e": 1.0,
                "alarm": false
              },
              "hi": {
                "e": 1.0,
                "alarm": false
              }
            },
            "kupiec_p": 0.41,
            "dq_p": null
          }
        }
      }
    }
  },
  "challengers": [
    {
      "chain": "ewma",
      "label": "shadow, not shown on the trader page",
      "assets": [
        "BTC",
        "XAU"
      ],
      "status": "running",
      "by": {
        "BTC": {
          "24h": {
            "n": 40,
            "held90": 0.925,
            "winkler90": 0.051,
            "held80": 0.85,
            "winkler80": 0.042,
            "main": {
              "held90": 0.9,
              "winkler90": 0.049,
              "held80": 0.775,
              "winkler80": 0.041
            }
          }
        }
      }
    },
    {
      "chain": "ttm",
      "label": "shadow, not shown on the trader page",
      "assets": [
        "BTC"
      ],
      "status": "waiting",
      "text": "waiting: switched off for now, so it is not scored yet"
    },
    {
      "chain": "learned_weights",
      "status": "queued",
      "label": "shadow, not shown on the trader page",
      "name": "learned blend weights",
      "starts": 1814486400
    }
  ]
}

GET /v1/evolution

What changed in the models, how it was tested and what came of it, newest first. Updated nightly. Cache: Cache-Control: public, max-age=3600.

Fields: the envelope, plus entries: [{date, change, test, result, plain}], date as YYYY-MM-DD, and self_correction: [{asset, horizon, ratio, checks}], one row per asset and horizon with a nightly state.

Example response (45 lines)
{
  "api": "v1",
  "generated_at": 1830297900,
  "credits": [
    "Price data: Bitstamp",
    "Metal prices: gold-api.com"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [],
  "entries": [
    {
      "date": "2027-02-01",
      "change": "XAU hourly view: the hourly share is frozen.",
      "test": "Computed once from the first 20 trading days of the live gold-api poll. Later prices never change it.",
      "result": "The hourly view for XAU uses this share from now on."
    },
    {
      "date": "2026-11-07",
      "change": "timing test crypto",
      "test": "vqf timing --class crypto, six rules out of sample (prereg docs/research/2026-11-05-timing-test/prereg.md)",
      "result": "no_edge",
      "plain": "Tested six simple rules for when to buy or sell crypto, on data they had not seen. None showed an edge, so the page gives no buy or sell timing."
    }
  ],
  "self_correction": [
    {
      "asset": "BTC",
      "horizon": "24h",
      "ratio": 1.0734,
      "checks": 412
    },
    {
      "asset": "BTC",
      "horizon": "8h",
      "ratio": 0.9618,
      "checks": 1236
    },
    {
      "asset": "XAU",
      "horizon": "24h",
      "ratio": null,
      "checks": 7
    }
  ]
}

GET /v1/record

The tools' own record: per asset and horizon, checks, held90, held80 and the touch_bins of the touch chances. Updated nightly. Cache: Cache-Control: public, max-age=3600.

Fields: the envelope, plus one key per asset that has a record, each keyed by horizon.

A cell of an asset whose 8h from-now ranges passed their history test also has the optional now_ fields: now_windows (settled live 8h windows), now_held90 and now_held80 (the share of those windows' ranges that held, null while now_windows is 0), and now_history_held90, now_history_held80 and now_history_windows (the same shares and the window count on history). These are ranges measured from the latest price inside a running 8h window, tested on history from May 2025 to April 2026. They are a record of past ranges, not a promise about the next one.

A 24h cell of ETH, XRP or SOL, whose from-now chances passed their history test, also has now_bins (10 bins of {p_lo, p_hi, checks, happened}: the live touch chances from now, scored once each window ended), now_chance_windows (settled live windows in that record) and now_history_bins (the same bins on the history test, four keys each). The live record covers the chances a Pro request could be served, from 30 minutes into the window until 30 minutes before its end; a window whose served tables cannot be reproduced exactly is left out and counted in the scorecard. These are a record of past chances, not a promise about the next one. Forecast, not financial advice.

Example response (79 lines)
{
  "api": "v1",
  "generated_at": 1830297900,
  "credits": [
    "Price data: Bitstamp",
    "Metal prices: gold-api.com"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [],
  "BTC": {
    "24h": {
      "checks": 40,
      "held90": 0.9,
      "held80": 0.775,
      "touch_bins": [
        {
          "p_lo": 0.0,
          "p_hi": 0.1,
          "checks": 0,
          "happened": 0
        },
        {
          "p_lo": 0.1,
          "p_hi": 0.2,
          "checks": 0,
          "happened": 0
        },
        {
          "p_lo": 0.2,
          "p_hi": 0.3,
          "checks": 0,
          "happened": 0
        },
        {
          "p_lo": 0.3,
          "p_hi": 0.4,
          "checks": 0,
          "happened": 0
        },
        {
          "p_lo": 0.4,
          "p_hi": 0.5,
          "checks": 0,
          "happened": 0
        },
        {
          "p_lo": 0.5,
          "p_hi": 0.6,
          "checks": 0,
          "happened": 0
        },
        {
          "p_lo": 0.6,
          "p_hi": 0.7,
          "checks": 0,
          "happened": 0
        },
        {
          "p_lo": 0.7,
          "p_hi": 0.8,
          "checks": 0,
          "happened": 0
        },
        {
          "p_lo": 0.8,
          "p_hi": 0.9,
          "checks": 0,
          "happened": 0
        },
        {
          "p_lo": 0.9,
          "p_hi": 1.0,
          "checks": 0,
          "happened": 0
        }
      ]
    }
  }
}

GET /v1/facts

Today's short facts about the forecasts, each with its source: a scheduled event inside a forecast window, a range that is unusually wide or calm against the past year, or a metal market that reopens within the hour. At most 3 per asset. A fact is a short plain statement about today's forecasts, with its source. It never gives a reason for a price move. Also the scheduled events of the next 7 days. Updated when the facts change. Cache: Cache-Control: public, max-age=3600.

Fields: the envelope, plus:

{
  "api": "v1",
  "generated_at": 1830297900,
  "credits": [
    "Price data: Bitstamp",
    "Metal prices: gold-api.com"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [],
  "facts": [
    {
      "text": "US CPI at 13:30 UTC falls inside today's forecast window.",
      "source": "https://www.bls.gov/schedule/news_release/cpi.htm",
      "asset": "BTC",
      "at": 1830346200
    }
  ],
  "upcoming": [
    {
      "t_utc": "2028-01-05T13:30:00Z",
      "name": "US CPI",
      "source_url": "https://www.bls.gov/schedule/news_release/cpi.htm"
    }
  ]
}

GET /v1/context

Facts about the past, with no forecast and no lean: where each price sat in its 52-week range, how it related to its 50- and 200-day averages, how its recent swing compared with the past year, and how pairs of assets moved together over the last 90 days. Updated once a night. Cache: Cache-Control: public, max-age=3600. This endpoint carries its own disclaimer, because it forecasts nothing: "Facts about the past. Not a forecast. Not financial advice."

Fields: the envelope, plus:

Illustrative figures, not real history.

Example response (254 lines)
{
  "api": "v1",
  "generated_at": 1830297900,
  "credits": [
    "Price data: Bitstamp",
    "Metal prices: gold-api.com"
  ],
  "disclaimer": "Facts about the past. Not a forecast. Not financial advice.",
  "labels": [],
  "as_of": "2027-12-31",
  "min_corr_n": 30,
  "assets": {
    "BTC": {
      "basis": "close_00z",
      "source": "Bitstamp",
      "as_of": "2027-12-31",
      "days_used": 540,
      "ma50": {
        "rel_pct": 4.25,
        "side": "above"
      },
      "ma200": {
        "rel_pct": -2.5,
        "side": "below"
      },
      "range52w": {
        "position": 0.62,
        "drawdown_pct": -15.8333,
        "high": 120000,
        "low": 70000,
        "price": 101000
      },
      "vol_pct": 72,
      "null_reasons": {}
    },
    "SOL": {
      "basis": "close_00z",
      "source": "Bitstamp",
      "as_of": "2027-12-31",
      "days_used": 140,
      "ma50": {
        "rel_pct": 0.02,
        "side": "at"
      },
      "ma200": null,
      "range52w": null,
      "vol_pct": null,
      "null_reasons": {
        "ma200": {
          "have": 140,
          "need": 200
        },
        "range52w": {
          "have": 140,
          "need": 329
        },
        "vol_pct": {
          "have": 110,
          "need": 329
        }
      }
    },
    "XAU": {
      "basis": "daily_avg",
      "source": "gold-api.com",
      "as_of": "2027-12-31",
      "days_used": 250,
      "ma50": {
        "rel_pct": 1.5,
        "side": "above"
      },
      "ma200": {
        "rel_pct": 6,
        "side": "above"
      },
      "range52w": {
        "position": 0.9,
        "drawdown_pct": -1.8519,
        "high": 2700,
        "low": 2200,
        "price": 2650
      },
      "vol_pct": 15,
      "null_reasons": {}
    },
    "XAUXAG": {
      "basis": "daily_avg",
      "source": "gold-api.com",
      "as_of": "2027-12-31",
      "days_used": 250,
      "ma50": {
        "rel_pct": -1.2,
        "side": "below"
      },
      "ma200": {
        "rel_pct": 3.4,
        "side": "above"
      },
      "range52w": {
        "position": 0.55,
        "drawdown_pct": -9.1,
        "high": 93.4,
        "low": 71.2,
        "price": 84.9
      },
      "vol_pct": 40,
      "null_reasons": {},
      "place": {
        "kind": "ratio",
        "share_below": 0.62,
        "since_year": 1970,
        "low_1y": 71.2,
        "high_1y": 93.4,
        "average": 64.8,
        "as_of": "2027-12-31",
        "history_as_of": "2027-12-31",
        "source": "Metal prices: gold-api.com"
      }
    }
  },
  "correlations": [
    {
      "a": "BTC",
      "b": "SOL",
      "window_days": 90,
      "basis": "close_00z",
      "n": 90,
      "r": 0.8,
      "lo": 0.7,
      "hi": 0.87,
      "null_reason": null
    },
    {
      "a": "BTC",
      "b": "XAU",
      "window_days": 90,
      "basis": "mid_high_low",
      "n": 61,
      "r": -0.1,
      "lo": -0.35,
      "hi": 0.15,
      "null_reason": null
    },
    {
      "a": "SOL",
      "b": "XAU",
      "window_days": 90,
      "basis": "mid_high_low",
      "n": 20,
      "r": null,
      "lo": null,
      "hi": null,
      "null_reason": "too_few_days"
    }
  ],
  "corr_history": {
    "BTC|SOL": [
      ["2027-12-10", null, null, null],
      ["2027-12-17", 0.62, 0.41, 0.76],
      ["2027-12-24", 0.71, 0.55, 0.82],
      ["2027-12-31", 0.8, 0.66, 0.89]
    ],
    "BTC|XAU": [
      ["2027-12-10", -0.2, -0.41, 0.04],
      ["2027-12-17", -0.05, -0.27, 0.18],
      ["2027-12-24", 0.02, -0.2, 0.24],
      ["2027-12-31", -0.1, -0.32, 0.13]
    ],
    "SOL|XAU": [
      ["2027-12-10", null, null, null],
      ["2027-12-17", null, null, null],
      ["2027-12-24", null, null, null],
      ["2027-12-31", null, null, null]
    ]
  },
  "weekly": {
    "BTC": [
      ["2027-12-10", 41000.5, null, null],
      ["2027-12-17", 42250.25, 40100.1234, null],
      ["2027-12-24", 43010.0, 40800.5, 38900.25],
      ["2027-12-31", 44120.75, 41500.0, 39200.5]
    ],
    "SOL": [
      ["2027-12-10", null, null, null],
      ["2027-12-17", null, null, null],
      ["2027-12-24", null, null, null],
      ["2027-12-31", null, null, null]
    ],
    "XAU": [
      ["2027-12-10", 2310.4, null, null],
      ["2027-12-17", 2325.1, 2290.5, null],
      ["2027-12-24", 2331.9, 2298.2, 2180.7],
      ["2027-12-31", 2340.0, 2305.0, 2190.3]
    ],
    "XAUXAG": [
      ["2027-12-10", 84.1, null, null],
      ["2027-12-17", 84.9, null, null],
      ["2027-12-24", 85.3, 83.2, null],
      ["2027-12-31", 86.0, 83.9, 80.5]
    ]
  },
  "big_moves": {
    "BTC": {
      "span_from": "2027-01-01",
      "thresholds": [10, 20, 30],
      "counts": {
        "10": { "up": 6, "down": 6 },
        "20": { "up": 3, "down": 2 },
        "30": { "up": 1, "down": 1 }
      },
      "top_up": [
        { "week": "2027-02-05", "pct": 34.2 },
        { "week": "2027-05-14", "pct": 28.1 },
        { "week": "2027-08-20", "pct": 22.6 },
        { "week": "2027-03-12", "pct": 15.4 },
        { "week": "2027-10-08", "pct": 11.3 }
      ],
      "top_down": [
        { "week": "2027-06-04", "pct": -31.5 },
        { "week": "2027-09-10", "pct": -24.8 },
        { "week": "2027-04-02", "pct": -18.2 },
        { "week": "2027-11-12", "pct": -12.7 },
        { "week": "2027-07-09", "pct": -10.4 }
      ],
      "cluster_share": 0.58
    },
    "SOL": { "reason": "too_few_weeks" },
    "XAU": {
      "span_from": "2027-01-01",
      "thresholds": [5, 10, 15],
      "counts": {
        "5": { "up": 9, "down": 7 },
        "10": { "up": 0, "down": 0 },
        "15": { "up": 0, "down": 0 }
      },
      "top_up": [
        { "week": "2027-03-05", "pct": 8.7 },
        { "week": "2027-06-18", "pct": 7.9 },
        { "week": "2027-09-24", "pct": 6.8 },
        { "week": "2027-02-12", "pct": 5.9 },
        { "week": "2027-11-05", "pct": 5.2 }
      ],
      "top_down": [
        { "week": "2027-04-23", "pct": -9.4 },
        { "week": "2027-07-30", "pct": -7.2 },
        { "week": "2027-10-15", "pct": -6.1 },
        { "week": "2027-05-28", "pct": -5.5 },
        { "week": "2027-12-03", "pct": -5.1 }
      ],
      "cluster_share": 0.5
    },
    "XAUXAG": { "reason": "data_check_pending" }
  }
}

GET /v1/schedule

The gold and silver trading hours: open intervals from 2 days ago to 16 days ahead. Updated nightly. Cache: Cache-Control: public, max-age=3600.

Fields: the envelope, plus intervals: [{open, close}], open at open and closed from close.

{
  "api": "v1",
  "generated_at": 1830297900,
  "credits": [
    "Price data: Bitstamp",
    "Metal prices: gold-api.com"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [],
  "intervals": [
    {
      "open": 1830034800,
      "close": 1830380400
    }
  ]
}

GET /v1/health

Whether the forecasts you read are being kept up to date: status is ok or degraded. It is degraded only when a price feed or the nightly run is late (a stale crypto candle, a stale gold or silver price, or a stale nightly state), and then assets names the symbols that concerns. The nightly run touches every asset, so a late nightly names them all. Every other thing the operator watches (the audit, the drift check, usage limits, the calendar, the terms dates) never changes this word. The reply never says why. status describes whether the data flows now: it is ok again as soon as a late feed recovers, even while a page still shows an entry that was made out of date by the price, because that entry clears at the next forecast. Cache: Cache-Control: public, max-age=300.

Fields: the envelope, plus status, and assets: the symbols a degraded word concerns, in the order of /v1/latest; empty when status is ok. An object served from before this field existed has none: read that as every asset.

{
  "api": "v1",
  "generated_at": 1830297900,
  "credits": [
    "Price data: Bitstamp",
    "Metal prices: gold-api.com"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [],
  "status": "ok",
  "assets": []
}

GET /v1/seals

The newest seal of the record. About every hour the Worker seals the forecasts and outcomes written since the last seal (see "How to check the record" below). Cache: Cache-Control: public, max-age=3600. Before the first seal it answers 503 not_ready.

Fields: the envelope, without generated_at (a seal carries its own sealed_at), plus:

Table: Field, Meaning (5 rows)
Field Meaning
seq the number of the newest seal; the first seal is 1
format the format of the newest seal: which column list rebuilds its leaves from a row (see "The bytes"); 1 today
head the chain head of that seal: 64 lower-case hex digits
sealed_at the Worker's clock time when that seal was written, unix seconds UTC
days the UTC days (YYYY-MM-DD) that have a day file, oldest first
{
  "api": "v1",
  "credits": [
    "Price data: Bitstamp",
    "Metal prices: gold-api.com"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [],
  "seq": 3,
  "format": 1,
  "head": "47f28f33e9f6fa6cda27884875526f1b09052c903dc486bce070f4d462e4a7a3",
  "sealed_at": 1793589600,
  "days": [
    "2026-11-02"
  ]
}

GET /v1/seals/{day}

The seals written on one UTC day, in order. {day} is a UTC calendar day written YYYY-MM-DD; any other text answers 400 bad_day. A day with no seal answers 404 not_found, and before the first seal the answer is 503 not_ready. Cache: Cache-Control: public, max-age=3600. Today's file grows as seals are added, so a copy of it can lag behind.

Fields: the envelope, without generated_at, plus day and seals. The example below is an excerpt: it leaves out the first seal of the day. Each entry of seals is one seal:

Table: Field, Meaning (12 rows)
Field Meaning
seq the number of the seal; the first seal is 1 and each seal is one more than the one before
format the format of the seal: which column list rebuilds its leaves from a row (see "The bytes"); 1 today, and never lower than the seal before
sealed_at the Worker's clock time when the seal was written, unix seconds UTC
f_from, f_to the ids of the forecast rows the seal holds, first and last; f_to is f_from - 1 when it holds none
o_from, o_to the same for outcome rows, by row number
n how many leaves the seal holds: the forecast rows plus the outcome rows
leaves_hex the leaves joined, 64 hex digits each: the forecasts first, then the outcomes
rows_digest the SHA-256 of the leaves joined, as 64 hex digits
prev_head the head of the seal before this one; 64 zeros for the first seal
head the head of this seal
stamped 1 when FreeTSA's time-stamp of head is in tsr_b64; 0 when the time-stamp did not arrive
tsr_b64 only when stamped is 1: FreeTSA's answer for head (a .tsr file) in base64

A seal holds hashes, counts, ids and times. It holds no row.

Example response (42 lines)
{
  "api": "v1",
  "credits": [
    "Price data: Bitstamp",
    "Metal prices: gold-api.com"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [],
  "day": "2026-11-02",
  "seals": [
    {
      "seq": 2,
      "format": 1,
      "sealed_at": 1793586000,
      "f_from": 3,
      "f_to": 3,
      "o_from": 2,
      "o_to": 1,
      "n": 1,
      "leaves_hex": "d2a66ad00fc64cd399c5c2cfa24fea0042914a2773da88c4c9bf5ab9c7ce7c2d",
      "rows_digest": "918591e15b651c899562546f343727502ce11fdf4f589005e6b17ae9e9c32634",
      "prev_head": "a98435c861bb39fb03aff2a4b88207670de8539e31ba51a1de94da87839e804e",
      "head": "0652aa77f509629a52d54eee38712b33856c6871ac53fd385bff0af37d03a89d",
      "stamped": 0
    },
    {
      "seq": 3,
      "format": 1,
      "sealed_at": 1793589600,
      "f_from": 4,
      "f_to": 3,
      "o_from": 2,
      "o_to": 2,
      "n": 1,
      "leaves_hex": "94df4e8f81790274923e6db7fb3d21f4a4e5fb2d1fb40ba05c861400e7b3725b",
      "rows_digest": "038040506134ffe3d42130a9b7376dbebb1858d782776a041328736c1879b0a5",
      "prev_head": "0652aa77f509629a52d54eee38712b33856c6871ac53fd385bff0af37d03a89d",
      "head": "47f28f33e9f6fa6cda27884875526f1b09052c903dc486bce070f4d462e4a7a3",
      "stamped": 0
    }
  ]
}

Pro endpoints

Everything under /v1/pro/ is gated. It is never in a public endpoint, a public snapshot or the widget kit. Send a bearer credential: Authorization: Bearer <token>. Without one, or with a credential that is wrong, expired or made for another key, every request gets the same answer, so a response never says which part failed:

{
  "error": "unauthorized"
}

The status is 401. A gated response is never cached (Cache-Control: private, no-store, Vary: Authorization, Origin) and has no ETag. A browser may call it only from the desk's own site (CORS allows that origin alone, never *, and the OPTIONS preflight is answered for it). Only GET and OPTIONS are accepted; any other method is 405. With a valid credential, a path that does not exist under /v1/pro/ is 404 not_found.

whoami: /v1/pro/whoami

Says which entitlement the credential holds. tier is owner, pro or api; exp is the UTC second the credential ends, or null when it does not end.

{
  "api": "v1",
  "tier": "pro",
  "exp": 1830297600
}

from now: /v1/pro/fromnow/{asset}/24h

The table behind the 24h chances from now: the past windows' remaining moves, measured from the same point of the day as now, in units of each window's own sigma, sorted ascending. t is the running window's start and k the seconds from it to the latest 30-minute checkpoint; n is how many past windows the table holds. touch_up and touch_dn hold each past window's largest remaining move up and down, end_up and end_dn where each past window ended, each as a plain list of numbers. The tables are built once a night and are read only here.

{
  "api": "v1",
  "asset": "ETH",
  "h": "24h",
  "t": 1830211200,
  "k": 5400,
  "n": 3,
  "touch_up": [0.1, 0.5, 1.5],
  "touch_dn": [0.2, 0.7],
  "end_up": [0.3, 0.9, 1.1, 2],
  "end_dn": [0.4]
}

A request with no table to give is 404:

The answer is never cached (Cache-Control: no-store).

Errors

Every error is JSON with error and the envelope (no generated_at), and Cache-Control: no-store. The gated paths under /v1/pro/ and /v1/owner/ are the exception: their errors carry no envelope and use Cache-Control: private, no-store, as "Pro endpoints" says.

Table: Status, error, When (8 rows)
Status error When
400 bad_path the path holds .., an encoded slash or backslash (%2F, %5C), or bad percent-encoding
400 bad_horizon {h} is not 24h or 8h
400 bad_day {day} is not a real UTC calendar day written YYYY-MM-DD
404 unknown_asset {asset} is not in the asset table
404 not_found no such route (there is no history route), or {day} is a day with no seal
405 method_not_allowed any method but GET
500 server_error the API could not read the route's object from storage; no ETag
503 not_ready the route's object has not been written yet (before the first forecast, nightly run or seal); no ETag
{
  "error": "unknown_asset",
  "api": "v1",
  "credits": [
    "Price data: Bitstamp",
    "Metal prices: gold-api.com"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": []
}
{
  "error": "not_ready",
  "api": "v1",
  "credits": [
    "Metal prices: gold-api.com"
  ],
  "disclaimer": "Forecast, not financial advice.",
  "labels": [
    "in_testing",
    "beta"
  ]
}

How to check the record

The Worker seals the forecasts and outcomes it wrote since the last seal, about every hour. It tries from 25 minutes past, for 15 minutes. If a job runs in a minute, or the health check, or an alert for a missed forecast, the seal waits for the next minute that has none. A seal can come later than that, or be skipped for an hour, while jobs are running or failing. The next hour's seal then covers the rows of both hours. If it wrote no row since the last seal, it makes no seal. A seal holds at most 100 leaves, one for each row it covers. When more rows are waiting, the rest go into the next seals, at most one an hour, in order. A seal is made of hashes, counts, ids and times. It holds no row.

Then the Worker asks FreeTSA, an outside time-stamp service (RFC 3161), to sign the seal's head together with FreeTSA's own clock time. Only the head is sent: 32 bytes, never a row. When the answer arrives, the seal is time-stamped by FreeTSA, an outside service, and it is published with stamped 1 and the answer in tsr_b64. When it does not arrive, the seal is still written, with stamped 0. The next time-stamped seal covers it, because every head includes the head before it.

The seals are at GET /v1/seals and GET /v1/seals/{day}.

What a seal shows

What a seal does not show

The bytes

Each seal has a format. It says which column list rebuilds the leaves from a row. The columns below are the columns of format 1. format is not part of the leaf or the head, so the number does not change a hash. A column added later gets a new format with its own list, and the list of format 1 stays as it is. A seal never has a lower format than the seal before it.

Step 1: check the chain

Get GET /v1/seals, then get GET /v1/seals/{day} for every day in days, oldest first. Save each as YYYY-MM-DD.json. Run this with Python 3, giving the files in that order. It uses only the standard library.

# python3 check_seals.py 2026-11-02.json 2026-11-03.json
import base64, hashlib, json, struct, sys

if len(sys.argv) < 2:
    sys.exit("give the day files, oldest first")
prev_head, prev_seq, f_to, o_to, fmt, broken = bytes(32), 0, 0, 0, 1, False
for path in sys.argv[1:]:
    for s in json.load(open(path))["seals"]:
        leaves = bytes.fromhex(s["leaves_hex"])
        digest = hashlib.sha256(leaves).digest()
        head = hashlib.sha256(bytes.fromhex(s["prev_head"]) + digest + struct.pack(">QQ", s["seq"], s["sealed_at"])).hexdigest()
        rows = (s["f_to"] - s["f_from"] + 1) + (s["o_to"] - s["o_from"] + 1)
        ok = (
            s["seq"] == prev_seq + 1
            and s["format"] >= fmt
            and s["prev_head"] == prev_head.hex()
            and s["rows_digest"] == digest.hex()
            and s["head"] == head
            and s["f_from"] == f_to + 1 and s["o_from"] == o_to + 1
            and s["f_to"] >= s["f_from"] - 1 and s["o_to"] >= s["o_from"] - 1
            and s["n"] == rows and len(leaves) == 32 * rows
        )
        line = f'{s["seq"]} {"ok" if ok else "BROKEN"}'
        if s["stamped"] == 1:
            open(f'{s["seq"]}.tsr', "wb").write(base64.b64decode(s["tsr_b64"]))
            line += f'  head {s["head"]}  time-stamp saved as {s["seq"]}.tsr'
        print(line)
        broken = broken or not ok
        prev_seq, prev_head, f_to, o_to, fmt = s["seq"], bytes.fromhex(s["head"]), s["f_to"], s["o_to"], s["format"]
sys.exit(1 if broken else 0)

It prints one line per seal: ok, or BROKEN for a seal that does not fit the one before it. For each time-stamped seal it saves FreeTSA's answer as <seq>.tsr and prints the head.

Step 2: check a time-stamp

Download FreeTSA's two certificates from FreeTSA's own website. These links were read on 2026-11-14:

Then take a time-stamped seal, for example seal 3, and use the head the script printed for it:

openssl ts -verify -digest <head> -in 3.tsr -CAfile cacert.pem -untrusted tsa.crt
openssl ts -reply -in 3.tsr -text

The first command prints Verification: OK when the signature is FreeTSA's and the time-stamp is for that head. It may also warn that tsa.crt is not a CA certificate; that is expected. The second prints the Time stamp: line: the time FreeTSA signed, in GMT.

Step 3: check a row

If you hold a row's stored values, write its bytes as above, take the SHA-256, and look for the 64 hex digits in leaves_hex of the seals. A forecast row's id names its seal: the one whose f_from to f_to holds it. A row whose leaf is in no seal is not sealed.

For maintainers