Market event
A published statement that something happened in the market. The rows the market log renders and the feed carries.
Kinds
Constrained in the database to five:
| Kind | Meaning |
|---|---|
launch | Something became available |
price | A price moved |
policy | Terms, limits or conditions changed |
deprecation | Something is going away |
availability | Access or region changed |
Origins
| Origin | Written by |
|---|---|
curated | A person, through npm run event:add |
detected | Change detection, from two archived documents |
The inclusion rule for curated events
A curated event is refused unless its sourceUrl sits on one of the provider's own registrable domains, and that domain list is a column in witness.provider, not a habit.
The consequence is worth stating plainly: an accurate news report of a price change cannot become a curated event. Only the provider's own page can. The rule is a constraint precisely so that it cannot be relaxed for one entry because someone was confident.
sourceVerifiedOn records the day the URL was checked and found to answer.
The inclusion rule for detected events
A detected price event must name both sides of the comparison it came from, fromPeriodId and toPeriodId, and a database constraint enforces it. A detected move that cannot say what it moved from is not a move, it is an assertion.
Detected launches name neither, because there is no before: a launch row is written when a person promotes a candidate the collector saw.
Corrections are new rows
supersedesId names the event a later row replaces. Nothing is edited. The log is what the record said and when it said it, including when it was wrong, and a log that quietly rewrote its own history would not be evidence of anything.
A correction is a curated row, and it keeps the date of the row it restates, saying the true date in its text where the two differ. It may restate a curated row or a detected one. The committed log names the row by its day and headline, and a detected row by its origin as well, because a detected row is in the database alone: the seed finds it there by origin, provider, day and headline, and leaves the correction unpointed rather than guessing when it finds none or more than one. A superseded row stays in the log, marked, and leaves every summary of it: the week digests, the sized moves and the homepage count only rows that still stand.
Curated rows carry a partial unique index on (occurredOn, title), so seeding the log is idempotent and can run after every deploy without inserting duplicates. Detected rows are excluded from that index, because two genuine moves on one day for two cells can share a headline by coincidence and the record should keep both.
Reading events
curl "https://vitna.ai/api/v1/events?kind=price&since=2026-01-01"
curl https://vitna.ai/api/v1/feed.json