MTG Copilot Docs
Data model

Set value history

Each set's total TCGplayer value per day and per week, behind the set page's value chart.

4 columns. Every value below is generated from the provenance registry.

FieldTypeSourceUpdatedWritten by
set_codestringcalculateddailyscripts/ingest-mtgjson.ts (prices) → refresh_value_points()
The set (FK → sets.code).
bucketstringcalculateddailyscripts/ingest-mtgjson.ts (prices) → refresh_value_points()
daily, one point per day of the daily series; or weekly, one per week of the weekly series.
daystringcalculateddailyscripts/ingest-mtgjson.ts (prices) → refresh_value_points()
The day of a daily point, or the Monday of a weekly one.
centsnumbercalculateddailyscripts/ingest-mtgjson.ts (prices) → refresh_value_points()
Sum of the set's normal-finish printings, one of each: the daily TCGplayer retail USD price, or the weekly close. In cents.

TypeScript model

interface set_value_points {
  set_code: string
  bucket:   string
  day:      string
  cents:    number
}

On this page