Track which decks won this weekend, which cards just spiked in meta share, and which Standard / Modern / Pioneer staples are about to rotate. The API surfaces Limitless + MTGTop8 + tournament-deck data and joins it onto our 560K-card catalogue.
| Endpoint | Purpose |
|---|---|
GET /api/meta/relevance/{card_id} | 0–100 score: how meta-played this card is right now |
GET /api/meta/decks?format=standard | Top decks by win-rate / Top-8 share (last 30d) |
GET /api/meta/tournaments?game=mtg | Recent tournament results from Limitless + MTGTop8 |
GET /api/cards/{id}/stash-score | Combines meta-relevance + price trend + liquidity |
curl -H "Authorization: Bearer $CSM_KEY" \
"https://collectorstashmarket.com/api/meta/movers?format=standard&window=30d&limit=10"
import os, requests
CSM, KEY = "https://collectorstashmarket.com", os.environ["CSM_KEY"]
HDR = {"Authorization": f"Bearer {KEY}"}
movers = requests.get(
f"{CSM}/api/meta/movers",
headers=HDR,
params={"format": "modern", "window": "14d", "limit": 25},
).json()["items"]
# Filter: meta-share went from < 5% to > 10% — fresh staples
fresh = [m for m in movers if m["share_then"] < 0.05 and m["share_now"] > 0.10]
for m in fresh:
print(f"{m['card_name']:30s} share {m['share_then']:.1%} → {m['share_now']:.1%}")
type Card = {
card_id: number;
card_name: string;
meta_share: number;
price_change_30d: number; // -1..1
};
const HDR = { Authorization: `Bearer ${process.env.CSM_KEY}` };
const meta = await fetch(
"https://collectorstashmarket.com/api/meta/relevance?format=pioneer&top=50",
{ headers: HDR },
).then((r) => r.json()) as { items: Card[] };
// Cards rising in meta AND price → speculation target
const targets = meta.items
.filter((c) => c.meta_share > 0.08 && c.price_change_30d > 0.10)
.sort((a, b) => b.meta_share - a.meta_share);
console.table(targets.map((c) => ({
card: c.card_name,
meta: `${(c.meta_share*100).toFixed(1)}%`,
price_30d: `${(c.price_change_30d*100).toFixed(1)}%`,
})));
// Cron at 09:00 — post yesterday's Top-8 to a Slack channel
import { WebClient } from "@slack/web-api";
const slack = new WebClient(process.env.SLACK_TOKEN);
const r = await fetch(
"https://collectorstashmarket.com/api/meta/tournaments?game=pokemon&limit=5",
{ headers: { Authorization: `Bearer ${process.env.CSM_KEY}` } },
).then((x) => x.json());
const lines = r.items.map(
(t: any) => `*${t.name}* (${t.players} players) — winner: ${t.winner_archetype}`,
);
await slack.chat.postMessage({
channel: "#tcg-meta",
text: `Yesterday's top tournaments:\n${lines.join("\n")}`,
});
<?php
$cid = $_GET["card_id"];
$ch = curl_init("https://collectorstashmarket.com/api/cards/$cid/stash-score");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer " . getenv("CSM_KEY")]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$score = json_decode(curl_exec($ch), true);
// score: { stash_score, meta_relevance, liquidity, price_trend_30d, verdict }
echo "Verdict: " . htmlspecialchars($score["verdict"]) . "\n";
echo "Stash-Score: " . $score["stash_score"] . "/100\n";