每日成交文件
某个已结束 UTC 日内全部饰品的成交记录,打包为一个 gzip NDJSON 文件:每行一个 JSON 对象,归档成交按饰品、市场、通道与方向分行,数据源自己的聚合点(Steam、WhiteMarket)按饰品、市场、通道与统计量分行。每行给出计数及其口径、原币种价格统计与币种、按当日历史汇率换算的美元值,以及完整性。不同数据源从不相加;文件中没有某饰品或市场的行,表示当日情况未知,而不是零成交。Pro 与 Enterprise 套餐。支持 CS2 与 Rust。
一次请求返回一整天:gzip NDJSON 文件(Content-Type: application/gzip),每行一个 SalesDailyRow。先解压,再逐行解析。不同市场、通道、方向或币种的行从不相加;比较市场时请比较各自的行。文件中缺少某饰品或市场,表示当日情况未知,而不是零成交。
构建时间:每个已结束的 UTC 日在次日约 06:10 UTC 构建(X-Sales-Final: false),并在再次日约 18:10 UTC 纳入迟到的成交、作为最终版重建一次。重建时 ETag 会变化,因此请带上次的 ETag 发送 If-None-Match,在此之前会得到 304。其他响应头:Last-Modified(构建时间)、X-Sales-Received-Through(此后收到的归档不在文件中)与 X-Sales-Rows。
价格:price* 字段是以 currency 计的原币种金额,以十进制文本给出,从不取整到分。usdCents* 按当日历史汇率(fxDate)换算。Steam 的行是聚合点,economicBasis: steam_wallet、countBasis: units,请按钱包价格与售出件数理解。要读取单件饰品在一段范围内的逐笔成交,请用成交记录。
参数
YYYY-MM-DD:昨天或更早。请求今天返回 400。文件保留至昨天往前 31 天。cs2(默认)或 rust。ETag;文件未重建时返回 304。响应字段
YYYY-MM-DD。cs2 或 rust。["sales", "feed"])。sales:归档的逐笔成交,在此汇总。points:数据源自己当日的聚合点。sell_listing、buy_order 或 unknown,每个方向单独一行。聚合点行为 null。median(Steam)或 mean(WhiteMarket)。成交行为 null。hour、day 或 unknown。成交行为 null。sales 或 units(Steam 按售出件数计);当且仅当 count 为 null 时为 null。lower_bound:文件只包含归档已收到的内容,当日的实际成交可能更多。cash 或 steam_wallet(Steam 钱包余额,无法提现)。USD 或 RUB。以两种币种成交的市场,每种币种单独一行。median 点时才有值。mean 点给出其自身的值),计数未知时为 null。priceMin 按当日历史汇率换算的美分;缺少汇率时为 null。priceMax 换算的美分。priceMedian 换算的美分;priceMedian 为 null 时为 null。priceMean 换算的美分;priceMean 为 null 时为 null。错误
date 缺失或无效、game 无效,或请求的日期尚未结束(今天或更晚)。Authorization 头、认证方案不支持,或密钥未知、未激活、已过期、已吊销。Retry-After 重试。export SKINPRICER_API_KEY="sp_live_•••"
# The body is gzip NDJSON: one JSON row per line. etag.txt keeps the ETag,
# so a repeat call answers 304 and leaves the file as it is until the day
# is rebuilt as final. Needs curl 7.68 or newer.
# Two days ago in UTC (macOS date, then GNU date): a closed day inside the
# 31 days kept.
DAY=$(date -u -v-2d +%F 2>/dev/null || date -u -d "2 days ago" +%F)
curl -G "https://pricing.skinpricer.com/v2/sales/daily" \
--data-urlencode "game=cs2" \
--data-urlencode "date=$DAY" \
-H "Authorization: ApiKey $SKINPRICER_API_KEY" \
--etag-compare etag.txt \
--etag-save etag.txt \
-o "sales-cs2-$DAY.ndjson.gz"
gunzip -c "sales-cs2-$DAY.ndjson.gz" | head -n 2// No SDK helper for this endpoint yet, so call it directly.
import { gunzipSync } from "node:zlib";
const url = new URL("https://pricing.skinpricer.com/v2/sales/daily");
// Two days ago in UTC: a closed day inside the 31 days kept.
const day = new Date(Date.now() - 2 * 86_400_000).toISOString().slice(0, 10);
url.searchParams.set("game", "cs2");
url.searchParams.set("date", day);
const res = await fetch(url, {
headers: { Authorization: `ApiKey ${process.env.SKINPRICER_API_KEY}` },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
// The body is a gzip file (Content-Type: application/gzip), so unpack it yourself.
const rows = gunzipSync(Buffer.from(await res.arrayBuffer()))
.toString("utf8")
.split("\n")
.filter(Boolean)
.map((line) => JSON.parse(line));
console.log(rows.length, "rows; final:", res.headers.get("x-sales-final"));import gzip
import json
import os
from datetime import datetime, timedelta, timezone
import requests
# Two days ago in UTC: a closed day inside the 31 days kept.
day = (datetime.now(timezone.utc) - timedelta(days=2)).date().isoformat()
res = requests.get(
"https://pricing.skinpricer.com/v2/sales/daily",
params={"game": "cs2", "date": day},
headers={"Authorization": f"ApiKey {os.environ['SKINPRICER_API_KEY']}"},
timeout=60,
)
res.raise_for_status()
# The body is a gzip file (Content-Type: application/gzip), so unpack it yourself.
rows = [json.loads(line) for line in gzip.decompress(res.content).splitlines() if line]
print(len(rows), "rows; final:", res.headers.get("X-Sales-Final"))需要认证的接口:请在你自己的客户端中携带 API 密钥调用(见代码示例)。
{"date":"2026-11-25","game":"cs2","itemName":"'Blueberries' Buckshot | NSWC SEAL","phase":null,"paintIndex":null,"itemId":"cmlofc0to0jmy01yov7ynz7pk","market":"marketcsgo","lanes":["sales","feed"],"evidence":"sales","side":"unknown","statistic":null,"resolutions":null,"points":null,"count":4,"countBasis":"sales","completeness":"lower_bound","economicBasis":"cash","currency":"RUB","priceMin":"648.00","priceMax":"720.00","priceMedian":"683.995","priceMean":"683.9975","firstAt":"2026-11-25T12:45:55.000Z","lastAt":"2026-11-25T17:50:51.000Z","usdCentsMin":789,"usdCentsMax":876,"usdCentsMedian":832,"usdCentsMean":832,"fxDate":"2026-11-25"}
{"date":"2026-11-25","game":"cs2","itemName":"★ Ursus Knife | Urban Masked (Field-Tested)","phase":null,"paintIndex":null,"itemId":"cmlofc2020jtq01yowjywk219","market":"steamcommunity","lanes":["history"],"evidence":"points","side":null,"statistic":"median","resolutions":["unknown"],"points":3,"count":3,"countBasis":"units","completeness":"lower_bound","economicBasis":"steam_wallet","currency":"USD","priceMin":"58.011","priceMax":"68.00","priceMedian":null,"priceMean":"63.02233","firstAt":"2026-11-25T17:00:00.000Z","lastAt":"2026-11-25T23:00:00.000Z","usdCentsMin":5801,"usdCentsMax":6800,"usdCentsMedian":null,"usdCentsMean":6302,"fxDate":null}