Inventory & fair value

How to Value a CS2 Inventory in Cash

Value a CS2 inventory by batching market_hash_name values through POST /v1/prices/latest, matching Doppler phases, producing three totals (listing / sell-now / conservative), and never mixing Steam Wallet with withdrawable cash.

Quick start

Copy-paste curl example

Authenticate with your Bearer API key. Full reference in the API docs and data coverage.

curl -s -X POST "https://api.cspriceapi.com/v1/prices/latest" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      "AK-47 | Redline (Field-Tested)",
      "★ Karambit | Doppler (Factory New)"
    ],
    "markets": "youpin,buff163,skinport,csfloat,steam"
  }'

Overview

Three totals every report needs

TotalDefinitionPrimary sources
Cash listing valueWhat you could list for on cash markets todayMedian price across YouPin, BUFF, Skinport, CSFloat, …
Sell-now valueWhat buyers bid right now (instant exit)YouPin buyorder book, cash-market bids where available
Conservative valueLiquidity-adjusted — thin items move toward bidsLower of listing median and bid; flag unknowns

Keep Steam Community Market in a separate column. Steam Wallet is not bank cash (Steam guide).

Guide

Step 1 — Build your asset list

Your inventory source (Steam API, CSFloat inventory export, spreadsheet) should yield:

market_hash_name, quantity, doppler_phase (optional), asset_id (optional)

Rules:

  • Aggregate identical commodity skins (10× Redline FT = one row, qty 10).
  • Split Doppler/Gamma by phase — Ruby and Phase 4 are different rows.
  • Do not fuzzy-match names. Unknown strings go to an exceptions table.

CSPriceAPI does not fetch Steam inventories for you — supply the names; the API supplies prices.

Guide

Step 2 — Batch price requests (100 items max)

curl -s -X POST "https://api.cspriceapi.com/v1/prices/latest" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      "AK-47 | Redline (Field-Tested)",
      "★ Karambit | Doppler (Factory New)"
    ],
    "markets": "youpin,buff163,skinport,csfloat,steam"
  }'

For each (market_hash_name, doppler_phase):

  1. Collect non-null price from cash markets (exclude Steam for cash totals).
  2. Compute listing value = median of cash-market asks (or trimmed mean dropping outliers).
  3. Fetch sell-now from YouPin buyorder for CN items:
curl -s "https://api.cspriceapi.com/v1/prices/youpin/buyorder" \
  -H "Authorization: Bearer YOUR_API_KEY"
  1. line_value = unit_value × quantity

Guide

Step 3 — Minimal Python sketch

import statistics
import requests

API = "https://api.cspriceapi.com"
KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {KEY}"}

CASH_MARKETS = ("youpin", "buff163", "skinport", "skinbaron", "csfloat", "dmarket")

def price_batch(names: list[str]) -> dict:
    r = requests.post(
        f"{API}/v1/prices/latest",
        headers=HEADERS,
        json={"items": names, "markets": ",".join(CASH_MARKETS)},
        timeout=60,
    )
    r.raise_for_status()
    return r.json()

def listing_median(rows: list[dict], name: str, phase: str | None) -> float | None:
    prices = []
    for market_block in rows if isinstance(rows, list) else [rows]:
        for item in market_block.get("items", []):
            if item.get("market_hash_name") != name:
                continue
            if (item.get("doppler_phase") or None) != (phase or None):
                continue
            p = item.get("price")
            if p is not None:
                prices.append(float(p))
    return statistics.median(prices) if prices else None

# inventory = [{"name": "...", "qty": 1, "phase": None}, ...]

Extend with: FX conversion (CNY→USD/EUR), fee tables, and buyorder join.

Guide

Step 4 — Liquidity gates

SignalAction
count >= 20 on ≥2 marketsFull listing median
count 1–5 everywhereMove toward sell-now bid; lower confidence
No price in 24hMark unpriced — do not use zero
Doppler phase missingDo not fall back to base Doppler average

Guide

Step 5 — Validate with sales (optional)

Listing value alone overstates items that never trade. Spot-check high-value rows:

curl -s "https://api.cspriceapi.com/v1/market-sales/search?market_hash_name=★%20Karambit%20%7C%20Doppler%20(Factory%20New)" \
  -H "Authorization: Bearer YOUR_API_KEY"

See sales data product for bulk exports.

Guide

YouPin-first valuation (market reality)

YouPin898 is the largest CS2 marketplace by volume. Even if you never buy on YouPin, its prices anchor:

  • CN wholesale discovery
  • What Western markets mean when they say "below Buff"
  • Collector item reference for Doppler phases

Start valuation from YouPin + BUFF, then sanity-check Western retail (Skinport, CSFloat).

Guide

No-code portfolio check

Guide

Snapshot schema (store every run)

valuation_id, run_at
market_hash_name, doppler_phase, quantity
listing_unit, sell_now_unit, conservative_unit
sources_json, confidence, unpriced_reason

Append snapshots — do not overwrite — so users see market moves vs methodology changes.

Related

Continue reading

More guides

Related Inventory & fair value

Ready to integrate?

Interactive Scalar docs, OpenAPI YAML and machine-readable Markdown mirrors for every endpoint.