Home
← Gradient

Gradient

The Pricing Database

  • 40Mrows
Price database architecture: listings, current catalogue, history table and the price computer
Listings in, current pricing out, history snapshotted behind it.

An RDS PostgreSQL instance with three tables: Listings, the raw input where scrape entries land; Current, the live price; and History, the record of what a price used to be. The primary key is (SKU, grade), so a price can be looked up per condition level.

  • POSTing a batch of new listings triggers a recompute for that SKU and grade.
    • A Redis queue holds the posted listings until the computer gets to them.
  • They run through an averaging algorithm that spots outliers and drops them. It could have been more complex, but I never put real ML behind it.
  • Once computed, the price lands in Current and is served through GET endpoints.
  • History is snapshotted daily from anything whose price moved in the last day.

This simple yet reliable system was the foundation for all pricing at Gradient. How the data gets there

← Back to Gradient