Skip to content

feat: price trend signal (best time to buy)#77

Merged
Pyronewbic merged 1 commit into
mainfrom
dev
May 13, 2026
Merged

feat: price trend signal (best time to buy)#77
Pyronewbic merged 1 commit into
mainfrom
dev

Conversation

@Pyronewbic
Copy link
Copy Markdown
Owner

Summary

  • computePriceTrend() analyzes sold comp history: direction (falling/rising/stable), signal (good_buy/wait/fair), 7d/30d changes, per-source breakdown, human-readable summary
  • Added to /api/price-history response as trend object (null if <3 data points)
  • Fixed health endpoint test (removed stale redis field check)

Type

  • Feature

Endpoints

  • GET /api/price-history — now includes trend object in response

Checks

  • yarn test:unit passes (140 tests, +10 new)
  • Sample data works — Umbreon/Greninja/Pikachu all return trend signals
  • No new secrets needed

Infrastructure

None

Frontend impact

Lovable prompt #29 ready — trend badge on card view and search results using trend.summary, trend.signal, trend.bestSource

Deploy notes

None — standard auto-deploy

computePriceTrend() analyzes sold comp history and returns:
- direction (falling/rising/stable), signal (good_buy/wait/fair)
- 7d and 30d price changes (% and $)
- per-source breakdown with bestSource
- human-readable summary ("Down 8% this week")

Added to /api/price-history response as trend object (null if <3
data points). 10 unit tests + 3 API tests.
@Pyronewbic Pyronewbic merged commit 00f8148 into main May 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant