How a number gets on the page

Published list prices, then a stored market price.

Box Price Tracker is a static site. The catalog lives in JSON files under data/games/. npm run build does not call a price API and does not need a secret. npm run refresh is the only command that talks to eBay or Scrydex.

List price

The MSRP column is a US dollar figure copied from a public page that names that product. The page is linked on the product. If that page does not print a price, the cell stays blank. A pack price times a pack count is not treated as the box price. A price for one Elite Trainer Box is not copied onto the next set's box.

Market price

With no API keys, refresh leaves prices.json and the history files untouched. The page keeps showing the last stored update, or “Not yet updated” when nothing has been stored.

eBay is the default market source when EBAY_CLIENT_ID and EBAY_CLIENT_SECRET are set. Refresh uses the official Browse API and the client-credentials token from eBay's client-credentials flow. It asks for current Buy It Now listings, keeps the condition filter on New when the API accepts it, and then drops titles that look like lots, cases, opened product, other languages, or the wrong product type. Prices far below a known list price, or many times above it, are dropped as junk. The quoted market price is the median of what remains, and only if at least three listings survive. Shipping is not included. The item price is what eBay returns in USD for EBAY_US.

Scrydex is off unless SCRYDEX_ENABLED=1 and SCRYDEX_API_KEY are set. Their API also expects SCRYDEX_TEAM_ID. The adapter calls the documented sealed-product endpoint, GET /{game}/v1/sealed, with include=prices, and uses the USD market figure. Games whose game.json sets scrydex.sealed to false are skipped, and a 404 from a sealed route skips the rest of that game. Card prices are not substituted for a sealed product. Scrydex is only used when eBay did not return a median for that product.

TCGplayer is not scraped. pokemontcg.io is not used. A failed request does not erase the previous stored price.

History and the 30-day column

Each accepted price appends one point per UTC day to data/games/{game}/history/{id}.json. Running refresh twice on the same day replaces that day's point. The chart is those points, with the list price as a dashed line when one exists. The 30-day figure compares the current stored price with the newest history point on or before 30 days earlier. One point, or a history shorter than 30 days, leaves the cell blank.

Adding a game

Add a folder under data/games/ with game.json and products.json. Optional prices.json starts empty. The build picks the folder up and adds /your-game/, a calendar, set pages, and product pages. Set scrydex.sealed only when that game has a sealed endpoint. eBay search uses searchQuery on the product and the category id on the game, which can be null.

Affiliate links

Buy buttons render only when the matching value in config/affiliates.json or the build environment is non-empty. eBay links are search URLs with an eBay Partner Network campaign id. TCGplayer is a URL, and {query} is replaced with the product search text. Amazon is a search URL with an Associates tag. Those anchors use rel="sponsored nofollow noopener". The footer affiliate sentence appears only when at least one of those values is set.