Monitoring
Polling for price moves is a race you pay to lose
Build price alerts and market monitoring on signed webhooks, daily history and thresholds across eight games.
The problem
Where this project usually goes wrong
Every alerting product starts the same way: a cron job that fetches prices and compares them to a stored value. It works, and then it does not scale, because the interval that makes alerts timely is the same interval that makes the bill enormous.
Worse, polling is a race you cannot win. Set the interval short and you spend most requests confirming nothing happened; set it long and your alert arrives after the move it was meant to warn about. Neither setting is right, because the underlying model is wrong.
And the thing users actually want to be alerted about is rarely the spot price. It is a direction — a card that has moved a certain amount over a period — which is a question about a series, not about today.
What it needs
The fields that decide it
- Signed webhooks
- The move comes to you when it happens, instead of you asking repeatedly whether it has.
- Threshold subscriptions
- Register the level that matters and receive a callback only when it is crossed.
- Daily history
- Alert on a direction over a window rather than a single close that one listing can move.
- Per-printing granularity
- Users care about the printing they own or want, not a blended card-level average that never moves interestingly.
- Both markets
- A move in one market frequently precedes the other, which is itself the signal.
In practice
The two queries that matter most
Written for notification products, discord bots and market watchers. Both work the same way for every game we carry.
Subscribe instead of polling
{
"url": "https://example.com/hooks/tcggraph",
"events": ["price.threshold.crossed", "set.published"],
"filter": {
"cardId": "mtg_f6555d1f-d4c",
"source": "cardmarket",
"above": 75.00
}
}One registration replaces an unbounded number of polling requests, and the callback is signed so you can verify it came from us.
Find what actually moved this week
curl -G "https://api.tcggraph.com/v1/cards" \
-d game=one-piece \
-d source=cardmarket \
-d sort=-priceChange7d \
-d limit=25 \
-H "Authorization: Bearer $TCGGRAPH_KEY"Movement is a property of the series, so asking for movers is one sorted request rather than a full catalogue sweep and a diff you compute yourself.
Avoid these
Three mistakes that are expensive to undo
Each of these is cheap to get right at the start and painful to retrofit once you have user data shaped the wrong way.
Alerting on the daily low
The low is the noisiest figure available and a single clearance listing will trigger it. Trend or a rolling average produces alerts users trust.
One alert per user per card
Deduplicate at the card level and fan out to subscribers on your side. Otherwise a popular card multiplies your work by your user count.
No cooldown on a threshold
A price oscillating around a level will fire repeatedly. Alert once and require a meaningful reversal before re-arming.
Questions
Price alerts and monitoring, answered
Also built on this
Other projects, same catalogue
Ship your card app this weekend
$19 a month for 25,000 credits, no sales call and no contract. Pick a plan and your first query runs in under a minute.