跳到主要内容
GET/v2/prices/rollingPRO+

滚动价格中位数文件

某款游戏全部饰品的滚动在售价与成交价中位数,打包为一个 gzip NDJSON 文件,无需逐件调用历史接口,即可把今天的价格与其 7 至 365 天的参考值比较。每行一个 JSON 对象:在售价按饰品与市场分行,归档成交按饰品、市场、通道、方向与币种分行,数据源自己的中位数序列(Steam、Skinport)按饰品与市场分行。每行包含全部窗口,各自给出计数、原币种中位数、美元中位数与完整性。不同市场与证据类型从不合并;缺少某行或中位数为 null 表示未知,而不是零。每天约 06:40 UTC 重建。Pro 与 Enterprise 套餐。支持 CS2 与 Rust。

一次请求返回整款游戏:gzip NDJSON 文件(Content-Type: application/gzip,Content-Disposition: attachment; filename="skinpricer-rolling-<game>-<windowEnd>.ndjson.gz",没有 Content-Encoding),每行一个 RollingPriceRow。请保存、解压,再逐行解析。CS2 文件压缩后约 19 MB、约 68 万行;Rust 约 3 MB。不同市场或证据类型的行从不合并;比较市场时请比较各自的行。缺少某行或中位数为 null 表示未知,而不是零。

在售价日点(daily_lowest_ask):该市场每个 UTC 日的最低在售价,即分市场历史在 interval=1d 时给出的 minPrice,不含历史修正。窗口中位数是这些日点的中位数(偶数个时取中间两个的均值并取整),count 是有在售价的天数。成交(sale_prices):窗口内的每笔归档成交,被多次轮询看到的同一笔成交只计一次,与每日成交文件的合并方式相同;中位数以原币种精确计算。聚合点(unit_weighted_point_medians):数据源自己的日点,当天没有日点时取当天的小时点;中位数是售出件数累计达到一半时的最低点中位数,count 为件数。均值与总和序列(WhiteMarket、Mannco)不包含在内。

完整性:complete 表示窗口位于 SkinPricer 的采集范围内(CS2 在售价自 2026-02-16 起,Rust 自 2026-09-08 起,以及数据源自己的序列)。lower_bound 表示归档在整个窗口内都在采集该通道,但市场不会报告每一笔成交。partial_window 表示窗口开始于该通道第一个完整归档日之前,因此只包含市场历史仍然返回的内容。

时间安排与响应头:两款游戏每天约 06:40 UTC 重建;服务启动时若文件的最后一天不是昨天,也会重建。ETag 是文件的 sha256,每次构建都会变化;把它作为 If-None-Match 发回,在下一次构建之前会得到 304。其他响应头:Last-Modified(构建时间)、X-Rolling-Window-End(每行的 windowEnd)、X-Rolling-Received-Through(此后收到的归档不在文件中)与 X-Rolling-Rows(行数)。要读取单件饰品的每日序列而不是中位数,请用分市场历史或数据源成交序列。

参数

gamestring可选
查询参数。cs2(默认)或 rust。
If-None-Matchstring可选
请求头。你已持有文件的 ETag;在下一次每日构建之前返回无响应体的 304。

响应字段

RollingPriceRowgzip NDJSON 文件中的一行。每行都包含全部字段;null 表示未知或不适用。
gamestring
cs2 或 rust。
windowEndstring
每个窗口包含的最后一个 UTC 日,YYYY-MM-DD:构建前最后一个已结束的日。
itemIdstringnullable
SkinPricer 规范饰品 id;成交行的标题不对应任何目录饰品时为 null。
itemNamestringnullable
在售价行:目录名称。成交行:归档中该市场的挂单标题。
phasestringnullable
多普勒相位(如有)。
paintIndexintegernullable
市场报告的涂装编号。
marketstring
市场 id。
kindstring
ask 或 sale。
evidencestring
quotes:该市场每天的最低在售价。sales:归档的逐笔成交。points:数据源自己的中位数点。
lanesstring[]nullable
成交行:数据源通道,或合并的通道(Market.CSGO 与 RustTM 的 ["sales", "feed"],每笔成交只计一次)。在售价行为 null。
sidestringnullable
sales 行:sell_listing、buy_order 或 unknown,每个方向单独一行。其他行为 null。
basisstring
各窗口中位数的计算方式:daily_lowest_ask、sale_prices 或 unit_weighted_point_medians。见说明。
countBasisstring
count 的口径:days(在售价)、sales 或 units(聚合点)。
economicBasisstringnullable
成交行:cash 或 steam_wallet(Steam 钱包余额,无法提现)。在售价行为 null。
currencystring
median 的原币种,例如 USD 或 RUB。在售价行恒为 USD。以两种币种成交的市场,每种币种单独一行。
fxDatestringnullable
美元中位数所用历史汇率的日期(windowEnd);美元行无需换算,为 null。
windowsRecord<string, RollingWindow>
全部窗口,始终存在:在售价行为 7d、30d 与 90d,成交行另有 180d 与 365d。每个窗口都结束于 windowEnd。

嵌套与共享结构链接到 API 对象 参考页。

错误

400game 无效。
401缺少 Authorization 头、认证方案不支持,或密钥未知、未激活、已过期、已吊销。
403密钥有效,但套餐不是 Pro 或 Enterprise,订阅未激活/已过期,或 API 套餐不包含该游戏。
429超出速率限制;见 Retry-After 与 X-RateLimit-* 响应头。配额按账号合并计算,所有密钥共享。
503PRICES_ROLLING_UNAVAILABLE:该游戏的文件尚未构建(Retry-After: 300),或文件正在替换、文件存储不可用(Retry-After: 5)。请按 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 next
# daily build (about 06:40 UTC). Needs curl 7.68 or newer.
curl -G "https://pricing.skinpricer.com/v2/prices/rolling" \
  --data-urlencode "game=cs2" \
  -H "Authorization: ApiKey $SKINPRICER_API_KEY" \
  --etag-compare etag.txt \
  --etag-save etag.txt \
  -o rolling-cs2.ndjson.gz

gunzip -c rolling-cs2.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/prices/rolling");
url.searchParams.set("game", "cs2");

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));
const steamAsk = rows.find((r) => r.market === "steamcommunity" && r.kind === "ask");
console.log(rows.length, "rows to", res.headers.get("x-rolling-window-end"));
console.log(steamAsk?.itemName, steamAsk?.windows["30d"]);
import gzip
import json
import os

import requests

res = requests.get(
    "https://pricing.skinpricer.com/v2/prices/rolling",
    params={"game": "cs2"},
    headers={"Authorization": f"ApiKey {os.environ['SKINPRICER_API_KEY']}"},
    timeout=120,
)
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]
steam_ask = next(r for r in rows if r["market"] == "steamcommunity" and r["kind"] == "ask")
print(len(rows), "rows to", res.headers.get("X-Rolling-Window-End"))
print(steam_ask["itemName"], steam_ask["windows"]["30d"])

需要认证的接口:请在你自己的客户端中携带 API 密钥调用(见代码示例)。

响应 200
{"game":"cs2","windowEnd":"2026-11-27","itemId":"cmlofc0to0jmy01yov7ynz7pk","itemName":"'Blueberries' Buckshot | NSWC SEAL","phase":null,"paintIndex":null,"market":"steamcommunity","kind":"ask","evidence":"quotes","lanes":null,"side":null,"basis":"daily_lowest_ask","countBasis":"days","economicBasis":null,"currency":"USD","fxDate":null,"windows":{"7d":{"count":7,"median":"10.00","usdCentsMedian":1000,"completeness":"complete"},"30d":{"count":30,"median":"11.93","usdCentsMedian":1193,"completeness":"complete"},"90d":{"count":90,"median":"13.00","usdCentsMedian":1300,"completeness":"complete"}}}
{"game":"cs2","windowEnd":"2026-11-27","itemId":"cmlofc0to0jmy01yov7ynz7pk","itemName":"'Blueberries' Buckshot | NSWC SEAL","phase":null,"paintIndex":null,"market":"csfloat","kind":"sale","evidence":"sales","lanes":["sales"],"side":"sell_listing","basis":"sale_prices","countBasis":"sales","economicBasis":"cash","currency":"USD","fxDate":null,"windows":{"7d":{"count":0,"median":null,"usdCentsMedian":null,"completeness":"lower_bound"},"30d":{"count":132,"median":"9.78","usdCentsMedian":978,"completeness":"lower_bound"},"90d":{"count":240,"median":"10.00","usdCentsMedian":1000,"completeness":"partial_window"},"180d":{"count":240,"median":"10.00","usdCentsMedian":1000,"completeness":"partial_window"},"365d":{"count":240,"median":"10.00","usdCentsMedian":1000,"completeness":"partial_window"}}}
{"game":"cs2","windowEnd":"2026-11-27","itemId":"cmlofc0to0jmy01yov7ynz7pk","itemName":"'Blueberries' Buckshot | NSWC SEAL","phase":null,"paintIndex":null,"market":"steamcommunity","kind":"sale","evidence":"points","lanes":["history"],"side":null,"basis":"unit_weighted_point_medians","countBasis":"units","economicBasis":"steam_wallet","currency":"USD","fxDate":null,"windows":{"7d":{"count":123,"median":"10.70","usdCentsMedian":1070,"completeness":"complete"},"30d":{"count":583,"median":"12.488","usdCentsMedian":1249,"completeness":"complete"},"90d":{"count":1867,"median":"13.95","usdCentsMedian":1395,"completeness":"complete"},"180d":{"count":3779,"median":"18.617","usdCentsMedian":1862,"completeness":"complete"},"365d":{"count":8604,"median":"23.371","usdCentsMedian":2337,"completeness":"complete"}}}
响应头
X-RateLimit-Limit: <每分钟配额,由套餐决定>
X-RateLimit-Remaining: <本分钟剩余次数>
X-RateLimit-Reset: <距重置的秒数>
X-Request-ID: req_xxxxxxxxxxxxxxxx

使用与许可

API 及其数据的使用受我们的服务条款(英文)约束:不得转售或再分发数据,不得用于构建竞争性服务, 不得超出套餐的速率限制;在条款允许展示数据的场景下须注明数据来源为 SkinPricer。滥用行为可能被限流或封禁。