Card Shop Inventory Pricing: Auto-Price 12 TCGs with One API
Card shop inventory pricing for 12 TCGs: one API call per MTG or Yu-Gi-Oh! set, a % of TCGplayer market with a bulk floor, and a CSV export. Node.js code.

🔵 IN THIS GUIDE: a Node.js script that reads your shop's inventory CSV, pulls set-wide TCGplayer and Cardmarket prices for Magic and Yu-Gi-Oh! with one request per set, applies your pricing rule and writes a priced CSV. Set-wide prices for these games need the Ultra plan or the 7-day trial.
Quick Answer: To auto-price a card shop inventory, call
GET /{game}/prices/:setonce per set, not once per card. One call returned 1,133 price rows for MTG's Reality Fracture and 234 for Yu-Gi-Oh!'s Magnificent Monsters. Match each CSV line by card number and variant, apply a rule such as 90% of TCGplayer market with a $0.25 floor, and export the result. As of November 28, 2026, that rule prices a Normal Emrakul, the Exigent Doom (market $12.59) at $11.34. Set-wide prices for the ten games beyond Pokémon and One Piece need Ultra (€29/month) or the 7-day trial. Prices refresh once a day, so run the job once a day.
Most card shops sell more Magic and Yu-Gi-Oh! than anything else, and their singles are priced by hand: someone looks up the card, checks TCGplayer or Cardmarket, and types a number. That's fine for 50 cards and unworkable for 5,000. Prices also move after every set release and every tournament result.
This tutorial is for store owners and the developers they hire, not for app builders. The flow fits in one file. You start from an inventory CSV with game, set, number, variant, condition and quantity. You fetch the whole price list for each set with one request, apply a pricing rule you can explain to your staff, and export a CSV your POS or marketplace tool can import. It works the same way for all 12 games under one PokéWallet key. The examples use MTG and Yu-Gi-Oh! because that's where most shop volume is.
What the script doesn't do also matters. The price data has no condition split, no eBay sold listings and no graded prices. Your condition discounts are store policy, and the code keeps them separate from market data.
Key Takeaways
- One request per set, not per card:
GET /mtg/prices/24684returned 1,133 price rows for Reality Fracture in one response, so 40 sets cost about 80 requests a day including set lookups. - Rows are products × finishes, not cards: Reality Fracture has 677 catalog entries but 1,133 price rows, because Normal and Foil (or 1st Edition and Unlimited) each get their own row.
- Card number alone isn't unique: in Magnificent Monsters,
MAMO-EN001is both the base Dark Magician, the Pharaoh's Servant ($2.77 market) and the Extended Art version ($127.19) as of November 28, 2026. Match on name or a stored PokéWalletid. - Plan requirement: set-wide prices for MTG, Yu-Gi-Oh! and the other eight games need Ultra (€29/month) or the 7-day trial. Pro only unlocks paid endpoints for Pokémon and One Piece.
- Run once a day, don't poll: TCGplayer and Cardmarket prices refresh once a day, and each row carries an
updated_attimestamp of its last price change. - No condition, eBay or grading data: NM/LP/MP discounts are your own multipliers, and price history exists only for Pokémon.
What You Will Build
You'll build a script, price-inventory.mjs, that:
- Reads
inventory.csv(one line per SKU: game, set code, card number, variant, condition, quantity, optional name). - Resolves each set code to a
set_idwith the freeGET /{game}/sets/:setendpoint, which accepts aset_codeor aset_id. - Downloads the full price list for each set once, with
GET /{game}/prices/:set(Ultra). - Matches every inventory line to a price row by
card_numberandvariant, and bynamewhen the number is shared. - Applies an explicit rule: a percentage of TCGplayer
market_price(USD) or Cardmarkettrend(EUR), times your condition multiplier, never below a bulk floor. - Writes
priced.csvwith the reference price, your price, the PokéWalletid, theupdated_attimestamp and a status column (ok,ambiguous,not_found,no_price) so staff only review the exceptions.
The output is a file. It doesn't push prices to Shopify, TCGplayer or a POS for you. You import the CSV, or you build that integration on top.
Prerequisites
- Node.js 18+ (for the built-in
fetch) and two small, widely used CSV packages:
npm install csv-parse csv-stringify
- A PokéWallet API key on Ultra or the 7-day trial. The catalog endpoints (
/sets,/sets/:set,/cards/:id,/search) are free on every plan./{game}/prices/:setfor the ten games beyond Pokémon and One Piece is not. See our Pro vs Ultra comparison if you also stock Pokémon or One Piece. - An inventory export with at least these columns:
game,set,number,variant,condition,qty,name
mtg,FRA,1,Normal,NM,3,
mtg,FRA,1,Foil,LP,1,
ygo,MAMO,MAMO-EN001,1st Edition,NM,4,"Dark Magician, the Pharaoh's Servant"
ygo,MAMO,MAMO-EN001,1st Edition,NM,1,"Dark Magician, the Pharaoh's Servant (Extended Art)"
game is the PokéWallet game code (mtg, ygo, lor, fab, dbs, dgm, swu, cfv, rft, cpk). The full list with set counts is on the supported games page. variant has to use the API's wording: Normal/Foil for Magic, 1st Edition/Unlimited for Yu-Gi-Oh!. Quote names, because card names like "Emrakul, the Exigent Doom" contain commas.
Step 1: Get Your API Key
Create an account at /auth/login?signup=1. After you log in, the dashboard shows your key and usage, and that's where you start the 7-day trial. Keep the key out of the script and out of git:
export POKEWALLET_API_KEY="your-key-here"
Every request goes to https://api.pokewallet.io with the key in the X-API-Key header.
Step 2: The First Request
Before writing any logic, pull one set and look at the shape. Magnificent Monsters (MAMO, set_id 24707, released September 4, 2026 according to the API):
curl -H "X-API-Key: $POKEWALLET_API_KEY" \
https://api.pokewallet.io/ygo/prices/24707
The response (trimmed to two of 234 rows):
{
"success": true,
"source": "both",
"set_code": "MAMO",
"set_id": "24707",
"group_id": "24707",
"data": [
{
"id": "ygo_9a3718ca91c2b4423f3bd02f650c59e4ee88601dc34d7cf38563f2a33db17bebe508528b418815d5975ee98f02fa261d04cec9",
"card_number": "MAMO-EN001",
"name": "Dark Magician, the Pharaoh's Servant",
"product_type": "card",
"variant": "1st Edition",
"tcgplayer": {
"low_price": 1.45,
"mid_price": 3.52,
"high_price": 40,
"market_price": 2.77,
"direct_low_price": 7.99,
"updated_at": "2026-11-07T15:10:05.615063+00:00"
},
"cardmarket": {
"avg": 2.48,
"low": 0.69,
"trend": 2.12,
"avg1": 2.46,
"avg7": 2.16,
"avg30": 2.42,
"updated_at": "2026-11-07T15:08:05.419833+00:00"
}
},
{
"id": "ygo_57511f682870f1384352f6179ca6b07c0d21be965845052bd23653b88bdf3cae3bc36087a7037b5c5c9dd76464aa97b253e1d9",
"card_number": "MAMO-EN001",
"name": "Dark Magician, the Pharaoh's Servant (Extended Art)",
"product_type": "card",
"variant": "1st Edition",
"tcgplayer": { "market_price": 127.19, "updated_at": "2026-11-07T15:10:05.615063+00:00" },
"cardmarket": { "trend": 133.54, "updated_at": "2026-11-07T15:08:05.419833+00:00" }
}
],
"total": 234
}
The response tells you three things you'll need:
- Each row is a product in one finish. TCGplayer and Cardmarket prices for that finish sit side by side, already paired. In the MTG response, the Foil Emrakul row carries the Cardmarket foil price (trend €17.28), not the normal one.
- Two products share
MAMO-EN001. If you match on number and variant alone, you'll price an Extended Art at $2.77 or a base copy at $127.19. Both mistakes cost money. updated_atis the last price change, not the time of your request. A row can show a date weeks old because the price simply hasn't moved.
The Magic call works the same way: GET /mtg/prices/24684 for Reality Fracture (FRA, released October 2, 2026) returns "total": 1133 rows. The field-by-field reference for both games is in the Magic: The Gathering API docs and the Yu-Gi-Oh! API docs. Our MTG price API guide and Yu-Gi-Oh! price API guide cover single-card lookups.
Step 3: Building It Out
Here is the complete script. The pricing rule and the condition table are at the top, because they're business decisions, not code.
// price-inventory.mjs — run with: node price-inventory.mjs
import { readFileSync, writeFileSync } from "node:fs";
import { parse } from "csv-parse/sync";
import { stringify } from "csv-stringify/sync";
const BASE = "https://api.pokewallet.io";
const KEY = process.env.POKEWALLET_API_KEY;
if (!KEY) throw new Error("Set POKEWALLET_API_KEY");
// Your pricing rule. USD shop: tcgplayer.market_price. EUR shop: cardmarket.trend.
const RULE = { source: "tcgplayer", pct: 0.9, floor: 0.25 };
// Store policy, NOT market data: the API has no per-condition prices.
const CONDITION = { NM: 1.0, LP: 0.85, MP: 0.7, HP: 0.5, DMG: 0.3 };
async function api(path, attempt = 0) {
const res = await fetch(BASE + path, { headers: { "X-API-Key": KEY } });
if ((res.status === 429 || res.status >= 500) && attempt < 3) {
await new Promise((r) => setTimeout(r, 2000 * 2 ** attempt));
return api(path, attempt + 1);
}
if (!res.ok) throw new Error(`HTTP ${res.status} on ${path}`);
return res.json();
}
// Free endpoint: accepts set_code or set_id and returns set.set_id.
async function resolveSetId(game, set) {
const json = await api(`/${game}/sets/${encodeURIComponent(set)}`);
if (!json.set?.set_id) {
throw new Error(`${game}/${set} did not resolve to one set: put its set_id in the CSV`);
}
return json.set.set_id;
}
// Ultra endpoint: every price row of the set in one call.
async function loadSetPrices(game, setId) {
const json = await api(`/${game}/prices/${setId}`);
if (json.data.length < json.total) {
console.warn(`${game}/${setId}: got ${json.data.length} of ${json.total} rows, check the docs for paging`);
}
return json.data;
}
function referencePrice(row) {
return RULE.source === "tcgplayer"
? row.tcgplayer?.market_price ?? null
: row.cardmarket?.trend ?? null;
}
function shopPrice(ref, condition) {
const mult = CONDITION[condition] ?? 1;
const raw = Math.max(RULE.floor, ref * RULE.pct * mult);
return Math.ceil(raw * 100) / 100; // round up to the cent
}
function findRow(rows, item) {
let hits = rows.filter((r) => r.card_number === item.number && r.variant === item.variant);
if (item.name) hits = hits.filter((r) => r.name === item.name);
return hits;
}
const inventory = parse(readFileSync("inventory.csv"), {
columns: true, skip_empty_lines: true, trim: true,
});
// One price download per distinct game+set.
const priceBook = new Map();
for (const item of inventory) {
const key = `${item.game}|${item.set}`;
if (priceBook.has(key)) continue;
const setId = await resolveSetId(item.game, item.set);
priceBook.set(key, await loadSetPrices(item.game, setId));
}
const out = inventory.map((item) => {
const hits = findRow(priceBook.get(`${item.game}|${item.set}`), item);
if (hits.length !== 1) {
return { ...item, status: hits.length ? "ambiguous" : "not_found" };
}
const row = hits[0];
const ref = referencePrice(row);
const base = { ...item, pokewallet_id: row.id };
if (ref === null) return { ...base, status: "no_price" };
return {
...base,
reference: ref,
price: shopPrice(ref, item.condition),
price_updated_at: row[RULE.source]?.updated_at ?? "",
status: "ok",
};
});
const columns = ["game", "set", "number", "variant", "condition", "qty", "name",
"pokewallet_id", "reference", "price", "price_updated_at", "status"];
writeFileSync("priced.csv", stringify(out, { header: true, columns }));
console.log(`Priced ${out.filter((r) => r.status === "ok").length} of ${out.length} lines`);
Run against the four sample lines, with prices as of November 28, 2026 (TCGplayer market, USD), the rule gives:
| Card | Variant | Cond. | TCGplayer market | Shop price |
|---|---|---|---|---|
| Emrakul, the Exigent Doom (FRA 1) | Normal | NM | $12.59 | $11.34 |
| Emrakul, the Exigent Doom (FRA 1) | Foil | LP | $17.15 | $13.12 |
| Dark Magician, the Pharaoh's Servant (MAMO-EN001) | 1st Edition | NM | $2.77 | $2.50 |
| Dark Magician, the Pharaoh's Servant (Extended Art) | 1st Edition | NM | $127.19 | $114.48 |
Source: PokéWallet API, TCGplayer market price in USD, sampled November 28, 2026; rows last changed November 7, 2026. The LP multiplier (0.85) is an example store policy.
The floor matters for bulk. The Reality Fracture statistics endpoint lists a TCGplayer minimum of $0.11 for the set. At 90% that's $0.099, a price no shop wants on a binder page, so the $0.25 floor applies instead. Set the floor to whatever your bulk bins actually sell for.
For a euro shop, switch to RULE = { source: "cardmarket", pct: 0.95, floor: 0.2 }. The Normal Emrakul's trend of €12.88 becomes €12.24. Don't mix the two sources in one price list. The API reports USD and EUR separately and doesn't convert between them.
Handling Rate Limits
The reason to price per set is the request budget. Take a shop with 5,000 singles spread over 40 sets (an example; plug in your own numbers):
| Approach | Requests per run | Free (1,000/day) | Ultra (7,000/hour, 70,000/day) |
|---|---|---|---|
One /{game}/cards/:id per SKU | 5,000 | Doesn't fit in a day | Fits, but uses most of an hour's limit |
One /{game}/prices/:set per set (+ set lookup) | 80 | n/a (needs Ultra) | About 1% of the hourly limit |
Limits from the pricing page as of November 5, 2026.
Per-card lookups aren't wrong. Card detail and search include current prices on every plan, including Free, so a shop with a few hundred singles can price card by card for free. But the cost grows with every SKU, while the per-set approach grows only with the number of sets. Once you've matched a line, store its pokewallet_id and pin each set's set_id in the CSV. That removes the set lookups entirely, leaving one request per set.
The script runs sequentially and retries on HTTP 429 and 5xx with exponential backoff, which is enough for a daily batch. Don't parallelise 40 requests to save a few seconds. Nothing in this flow is time-critical. If your inventory spans hundreds of sets, add a short pause between price calls and stay far under the hourly limit. The current limits and error codes are in the rate limits section of each game's docs.
Going to Production
- Schedule it once a day. TCGplayer and Cardmarket prices are refreshed once a day, so a cron job every hour just re-downloads the same numbers. Compare each row's
updated_atwith your previous run to see which prices actually moved. - Don't wait for push updates. Webhook events are only on the Business plan. On Ultra, the daily scheduled job is the right design.
- Review exceptions, not everything. Filter
priced.csvonstatus != okand on large changes against yesterday's price (your threshold, for example 25%). Put anything above a value you choose, say $50, through a human before it goes on the shelf. - Pin identities. After the first successful match, write
pokewallet_idback into your inventory and match on that. It removes theMAMO-EN001-style ambiguity for good. - Know the limits of the data. There are no per-condition prices, no eBay sold listings, no PSA or CGC graded values, and no price history outside Pokémon. Graded slabs and sealed products you price by other means should be left out of the CSV or given their own rule.
- Other games, same code. Swap the game code for Lorcana (
lor), Flesh and Blood (fab), Riftbound (rft) or any of the others; our 12-game TCG price API overview lists them. Pokémon and One Piece use their own paths (/prices/:setCode,/op/prices) and are covered by Pro as well as Ultra. - Prefer typed clients? The TypeScript and Python SDKs cover all twelve games, with pagination and typed errors handled for you.
If you're replacing direct TCGplayer and Cardmarket integrations, our TCGplayer & Cardmarket API alternative guide explains how the two sources are combined into each row.
Sources & Method
- Set data:
GET /mtg/sets/24684(Reality Fracture,FRA, 677 entries, released October 2, 2026) andGET /ygo/sets/24707(Magnificent Monsters,MAMO, 231 entries, released September 4, 2026), from the PokéWallet API. - Prices:
GET /mtg/prices/24684andGET /ygo/prices/24707, sampled November 28, 2026. TCGplayer market price in USD and Cardmarket trend in EUR. Price rows showupdated_atNovember 7, 2026, the last price change. The $0.11 minimum comes fromGET /mtg/sets/24684/statisticson the same date. - Plans and limits: PokéWallet product facts, last updated November 5, 2026. Check the pricing page for current terms.
- Condition multipliers, floor and percentage in this article are example store policies, not market data.
Frequently Asked Questions
How do card shops price their inventory automatically?
They export the inventory to a CSV, fetch market prices for each set from a price API, apply a fixed rule (such as 90% of TCGplayer market with a minimum price for bulk), and import the priced file back into their POS. With PokéWallet, that's one request per set via GET /{game}/prices/:set.
Is there an API for MTG and Yu-Gi-Oh! prices I can use for my store?
Yes. PokéWallet returns TCGplayer (USD) and Cardmarket (EUR) prices for Magic, Yu-Gi-Oh! and ten other games under one key. Single-card lookups are on every plan, and full set price lists need Ultra or the 7-day trial.
How much does the API cost for a card shop?
Ultra is €29/month with 7,000 requests per hour and 70,000 per day, and it unlocks set-wide prices for every game. The Free plan (1,000 requests a day) works for small inventories priced card by card.
Can I get card prices by condition (NM, LP, MP)?
No. The price data has no per-condition split. Apply your own condition multipliers to the market reference price, as the script in this guide does.
How often should I update my store prices?
Once a day. Prices are refreshed daily, so more frequent runs return the same numbers. Use each row's updated_at to see which prices actually changed.
Does it include eBay sold prices or PSA graded card values?
No. The only sources are TCGplayer and Cardmarket, and there's no grading data, so price graded slabs separately.
Can I price Pokémon and One Piece stock on the Pro plan?
Yes. Pro (€20/month) unlocks the paid endpoints for Pokémon and One Piece, including set-wide prices. For Magic, Yu-Gi-Oh! or the other eight games, you need Ultra.
Will it update my online store automatically?
Not by itself. The script writes a CSV that you import into your POS or marketplace tool, or you build that step yourself. Webhook events are only available on the Business plan.
💬 Price disclaimer: Prices in this article are TCGplayer market prices (USD) and Cardmarket trend prices (EUR) returned by the PokéWallet API, sampled on November 28, 2026; individual rows were last changed on November 7, 2026. Pricing rules and condition multipliers are examples, not recommendations. This is not financial advice: verify current prices before you buy, sell or reprice stock.
Start Building with the PokéWallet API
A shop's repricing job needs one key, one request per set and one daily run. The same script covers Magic, Yu-Gi-Oh! and every other game you stock.
- 🔑 One API key for 12 trading card games — Pokémon, One Piece, Magic, Yu-Gi-Oh!, Lorcana, Riftbound and more
- 📊 TCGplayer & Cardmarket prices for every card, refreshed daily
- 🆓 Free plan with 1,000 requests a day — sets, cards, search and images on every game
- ⚡ Ultra unlocks set-wide prices and analytics for every game — try it free for 7 days from your dashboard
- 💬 Developer support in our Discord
Get Started:
- 🚀 Get a free API key
- 📖 Read the API documentation
- 💳 Compare plans on the pricing page
This article is for informational purposes only and is not financial advice. Details reflect information available at the time of writing; release dates, pricing and set contents are subject to change. Card prices are volatile — always verify current market pricing before buying or selling.