Pricing & Valuations

Get Comparable Sales (Comps)

Get comparable sales (comps) for a card, with anomaly filtering and optional time-weighting.

Requires a card_id. If you only have a card name/description, call card-match or card-search first to get the card_id, then use it here.

This endpoint:

  1. Fetches the most recent sales for the card at the requested grade
  2. Filters only statistical price anomalies using IQR fences (keeps non-anomalous highs/lows)
  3. Calculates comp price using either:
    • Simple average (default)
    • Weighted Moving Average (if time_weighted=True), giving recent sales more weight
  4. Returns high/low from the filtered sales used in the comp
  5. Returns raw_high/raw_low from the unfiltered sales fetched for the request
  6. Optionally returns raw price data (if include_raw_prices=True)

Time-Weighting Algorithm (WMA): When time_weighted=True, recent sales are weighted more heavily:

  • Most recent sale: weight = n
  • Second most recent: weight = n-1
  • ...
  • Oldest sale: weight = 1
  • Formula: (P1n + P2(n-1) + ... + Pn*1) / (n + (n-1) + ... + 1)

Example curl:

# Basic comp (simple average)
curl -X POST -H "X-API-Key: your-api-key-here" \
     -H "Content-Type: application/json" \
     -d '{
       "card_id": "1587446850514x224832321163624450",
       "count": 10,
       "grade": "PSA 9"
     }' \
     "https://api.cardhedger.com/v1/cards/comps"

# Time-weighted comp with raw prices
curl -X POST -H "X-API-Key: your-api-key-here" \
     -H "Content-Type: application/json" \
     -d '{
       "card_id": "1587446850514x224832321163624450",
       "count": 10,
       "grade": "PSA 10",
       "time_weighted": true,
       "include_raw_prices": true
     }' \
     "https://api.cardhedger.com/v1/cards/comps"

Returns calculated comp price with anomaly-aware filtering.

post/v1/cards/comps

Request body

card_idstring required

Card ID

countinteger required

Number of comp prices (1-100)

gradestring required

Card grade (e.g., 'PSA 10', 'BGS 9.5')

time_weightedboolean

If true, weight recent sales more heavily using WMA algorithm

include_raw_pricesboolean

If true, include raw price data in response

Response

Successful Response

comp_pricenumber required

Calculated comparable price (after anomaly filtering)

highnumber required

Highest sale price used in comp calculation

lownumber required

Lowest sale price used in comp calculation

raw_highnumber required

Highest unfiltered sale price fetched for this comp request

raw_lownumber required

Lowest unfiltered sale price fetched for this comp request

count_requestedinteger required

Number of prices requested

count_usedinteger required

Number of prices used in calculation (after anomaly filtering)

time_weightedboolean required

Whether time-weighted algorithm was used

Example response

{
  "comp_price": 336,
  "count_requested": 5,
  "count_used": 5,
  "high": 348,
  "low": 325,
  "raw_high": 348,
  "raw_low": 325,
  "raw_prices": [
    {
      "card_id": "1587446850514x224832321163624450",
      "grade": "PSA 9",
      "image": "[image url]",
      "price": 325,
      "price_history_id": "1761480061129x501444455762531900",
      "price_source": "marketplace",
      "sale_date": "2025-10-26T13:00:00.000Z",
      "sale_type": "Best Offer",
      "sale_url": "[sale url]",
      "title": "[listing title]"
    },
    {
      "card_id": "1587446850514x224832321163624450",
      "grade": "PSA 9",
      "image": "[image url]",
      "price": 348,
      "price_history_id": "1761446206940x522975047258362750",
      "price_source": "marketplace",
      "sale_date": "2025-10-26T03:36:00.000Z",
      "sale_type": "Auction",
      "sale_url": "[sale url]",
      "title": "[listing title]"
    }
  ],
  "time_weighted": true
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.