---
title: "Get Comparable Sales (Comps)"
method: POST
path: "/v1/cards/comps"
tags: ["Pricing & Valuations"]
---

# Get Comparable Sales (Comps)

`POST /v1/cards/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: (P1*n + P2*(n-1) + ... + Pn*1) / (n + (n-1) + ... + 1)

**Example curl:**
```bash
# 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.

## Request body

- CompsRequest — Request schema for getting comp prices.
  - `card_id` string, required — Card ID
  - `count` integer, required — Number of comp prices (1-100)
  - `grade` string, required — Card grade (e.g., 'PSA 10', 'BGS 9.5')
  - `time_weighted` boolean — If true, weight recent sales more heavily using WMA algorithm
  - `include_raw_prices` boolean — If true, include raw price data in response

## Response `200`

Successful Response

- CompsResponse — Response schema for comp prices.
  - `comp_price` number, required — Calculated comparable price (after anomaly filtering)
  - `high` number, required — Highest sale price used in comp calculation
  - `low` number, required — Lowest sale price used in comp calculation
  - `raw_high` number, required — Highest unfiltered sale price fetched for this comp request
  - `raw_low` number, required — Lowest unfiltered sale price fetched for this comp request
  - `count_requested` integer, required — Number of prices requested
  - `count_used` integer, required — Number of prices used in calculation (after anomaly filtering)
  - `time_weighted` boolean, required — Whether time-weighted algorithm was used
  - `raw_prices` RawSale[], nullable — Raw price data (only included if include_raw_prices=true)
    - `price` number, required — Sale price in USD
    - `sale_date` string, nullable — Sale date
    - `price_source` string, nullable — Sale source
    - `sale_url` string, nullable — URL to sold eBay listing

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/cardhedger/apis/card-hedge-api.md) · [All operations](https://skmtc.dev/cardhedger/apis/card-hedge-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cardhedger/card-hedge-api/revisions/497390569396/schema)
