Marketplace price comparison
What to build
Section titled “What to build”Item search → seller offers and buy-order tables → a daily chart for a selected marketplace. Your server stores the key and caches public market data. The browser receives only the required fields.
Request sequence
Section titled “Request sequence”- Debounced
GET /v1/items?q=…&limit=20, not one request for every keystroke. GET /v1/items/{item_id}/marketsfor the selected item.GET /v1/items/{item_id}/historyfor one marketplace and a bounded date range.
Sort asks by ascending amount and bids by descending amount. Keep them separate. Format money using minor_units. Do not equate Steam wallet balances with withdrawable cash balances.
Acceptance checks
Section titled “Acceptance checks”- Search displays API results, not hard-coded demonstration prices.
- Selecting another phase uses that phase’s
item_id. - Empty history has a clear empty state.
- Charts do not contain points absent from the response.
- 429 respects
Retry-After; 401 stops further requests. - Keys do not appear in HTML, browser bundles, URLs or logs.
- Repeated views use a shared cache; 100 viewers do not cause 100 upstream requests.
This compares observed offers. It is not a trading bot or a promise of profit.
Runnable starter
Section titled “Runnable starter”Get Market comparison starter and the SDK from Downloads.
Their exact filenames and SHA-256 values are in the manifest
(examples and artifacts). Verify checksums, extract the starter into a new
directory, install the local SDK archive with npm install --ignore-scripts /path/to/archive.tgz,
set CSFOLDER_API_KEY in the server environment, then run npm start.
Open http://127.0.0.1:4319. Node.js 22+ is required; follow the bundled README.
This English reference UI uses real API responses, not bundled demo prices. It shows the last 30 UTC days of daily asks as individual dots with a data table. Search pagination, bid-only items, unknown timestamps and empty history are explicit. Quotes/history cache for 30 minutes; search caches for 30 seconds. 401/403 and exhausted monthly quota require an operator fix and server restart; 429 pauses requests until Retry-After, with explicit retry. No background polling.
The app is local-only, not a publicly deployable unauthenticated proxy. Before hosting it for users, add app authentication, per-user abuse controls and shared caching/limits across replicas. Do not expose it through a tunnel as-is. The starter does not provision API access; check release availability first.