批量价格历史
一次请求读取同一游戏最多 100 件饰品的聚合价格历史。items 的每个条目(market hash name、slug 或规范饰品 id)得到 GET /v2/pricing/:marketHashName/history 为它返回的响应体,并按发送时的原样作为键;无法解析的条目列在 errors 中,其余条目照常以 200 返回。同一个范围、粒度与 listingType 适用于所有饰品。每个不同条目计 5 个限流单位,与它所替代的单件读取相同。Pro 与 Enterprise 套餐。支持 CS2 与 Rust。
用一次 POST 读取最多 100 件饰品的历史,而不是每件一次 GET。请求体包含 items 以及单件读取的 from、to、interval、listingType、salesWindow 与 currency,默认值相同;不接受 markets,因为聚合序列不区分市场。返回 200(不是 201)。
items 的每个条目可以是精确的 market hash name、slug 或规范饰品 id,按此顺序尝试,结果按你发送时的原样作为键。匹配不到任何饰品的条目以 not_found(404)列在 errors 中;名称或 slug 被两件饰品共用的条目为 ambiguous(409),改用规范饰品 id 即可解析。其他条目照常返回。
批量请求与单件读取共用 10,000 个数据点的预算:不同饰品数乘以实际粒度下的时间桶数(两端都计入),SALE_HISTORY 按两倍计。100 件饰品可容纳 30 天的 DAY_1 或 4 天的 HOUR_1;默认 30 天的小时数据可容纳 13 件。10m 粒度的批量请求最多 25 件饰品。超过任一上限返回指明该上限的 400,请拆分批次或加宽粒度。
每个不同条目计 5 个限流单位,未能解析的条目也计入,与它所替代的单件读取相同:按 Pro 每分钟 1,200 个单位计,无论批次大小,每分钟可读 240 件饰品。每件饰品的序列与 /v2/pricing/:marketHashName/history 返回的相同。
参数
cs2 或 rust。所有饰品都在该游戏中读取。to 也是如此),因此指定较早的 to 时请同时传 from。MINUTE_5 | MINUTE_15 | HOUR_1 | HOUR_6 | DAY_1,与单件读取一样对齐到已存储的 10m / 1h / 1d 汇总。默认:由范围推导。饰品数乘以时间桶数不能超过 10,000 个数据点(SALE_HISTORY 的时间桶按两倍计),10m 粒度的批量请求最多 25 件饰品;超过任一上限返回指明该上限的 400。SELL_OFFER | BUY_ORDER | SALE_HISTORY。默认:SELL_OFFER。24h | 7d | 30d | 90d。仅当 listingType: "SALE_HISTORY" 时有效。默认:30d。EUR、GBP 或 JPY。所有饰品的每个价格按同一个当前汇率换算,汇率在顶层 fx 块中给出一次(fxBasis: "current")。缺省或 USD:美分。见以其他货币计价。响应字段
SELL_OFFER | BUY_ORDER | SALE_HISTORY,与请求一致。ask_statistic | bid_statistic | sale_statistic,含义同 HistoryResponse。10m | 1h | 1d。/v2 历史读取为它返回的 HistoryResponse 的映射,包含其自身的 corrections,不含 fx。HistoryBatchError 的映射。所有条目都已解析时为空。USD 以外的 currency 时出现:所有饰品的每个数据点换算所用的那一个汇率。嵌套与共享结构链接到 API 对象 参考页。
错误
game 无效;items 缺失、为空、超过 100 个或含无效条目;范围、interval、listingType 或 currency 无效;或批量请求超过 10,000 个数据点的预算或 10m 粒度下 25 件的上限。Authorization 头、认证方案不支持,或密钥未知、未激活、已过期、已吊销。currency 没有可用汇率。请稍后重试。export SKINPRICER_API_KEY="sp_live_•••"
curl -X POST "https://pricing.skinpricer.com/v2/pricing/history/batch?game=cs2" \
-H "Authorization: ApiKey $SKINPRICER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"items":["AK-47 | Redline (Field-Tested)","awp-asiimov-field-tested"],"from":"2026-11-26T00:00:00Z","to":"2026-11-27T00:00:00Z","interval":"DAY_1"}'// No SDK helper for this endpoint yet, so call it directly.
const url = new URL("https://pricing.skinpricer.com/v2/pricing/history/batch");
url.searchParams.set("game", "cs2");
const res = await fetch(url, {
method: "POST",
headers: { Authorization: `ApiKey ${process.env.SKINPRICER_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"items":["AK-47 | Redline (Field-Tested)","awp-asiimov-field-tested"],"from":"2026-11-26T00:00:00Z","to":"2026-11-27T00:00:00Z","interval":"DAY_1"}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());import os
import requests
res = requests.post(
"https://pricing.skinpricer.com/v2/pricing/history/batch",
params={"game": "cs2"},
json={"items":["AK-47 | Redline (Field-Tested)","awp-asiimov-field-tested"],"from":"2026-11-26T00:00:00Z","to":"2026-11-27T00:00:00Z","interval":"DAY_1"},
headers={"Authorization": f"ApiKey {os.environ['SKINPRICER_API_KEY']}"},
timeout=10,
)
res.raise_for_status()
print(res.json())需要认证的接口:请在你自己的客户端中携带 API 密钥调用(见代码示例)。
{
"listingType": "SELL_OFFER",
"priceKind": "ask_statistic",
"salesWindow": null,
"effectiveInterval": "1d",
"from": "2026-11-26T00:00:00.000Z",
"to": "2026-11-27T00:00:00.000Z",
"items": {
"AK-47 | Redline (Field-Tested)": {
"canonicalItemId": "cmlofczf90qj401vsd80dskd1",
"name": "AK-47 | Redline (Field-Tested)",
"listingType": "SELL_OFFER",
"priceKind": "ask_statistic",
"salesWindow": null,
"effectiveInterval": "1d",
"history": [
{
"timestamp": "2026-11-26T00:00:00.000Z",
"avgPrice": 2236,
"medianPrice": 2200,
"minPrice": 1967,
"maxPrice": 2499,
"listingCount": 27717,
"totalQuantity": null,
"volume": null,
"bestBidCents": 2160,
"bestAskCents": 1967,
"spreadBps": null,
"netBestBidCents": 2052,
"netSpreadBps": null
},
{
"timestamp": "2026-11-27T00:00:00.000Z",
"avgPrice": 2240,
"medianPrice": 2238,
"minPrice": 1854,
"maxPrice": 2492,
"listingCount": 27710,
"totalQuantity": null,
"volume": null,
"bestBidCents": 2145,
"bestAskCents": 1854,
"spreadBps": null,
"netBestBidCents": 2038,
"netSpreadBps": null
}
]
},
"awp-asiimov-field-tested": {
"canonicalItemId": "cmlofczmb0qca01yo2bdv4wql",
"name": "AWP | Asiimov (Field-Tested)",
"listingType": "SELL_OFFER",
"priceKind": "ask_statistic",
"salesWindow": null,
"effectiveInterval": "1d",
"history": [
{
"timestamp": "2026-11-26T00:00:00.000Z",
"avgPrice": 7921,
"medianPrice": 7677,
"minPrice": 7110,
"maxPrice": 9400,
"listingCount": 6193,
"totalQuantity": null,
"volume": null,
"bestBidCents": 7905,
"bestAskCents": 7110,
"spreadBps": null,
"netBestBidCents": 7510,
"netSpreadBps": null
},
{
"timestamp": "2026-11-27T00:00:00.000Z",
"avgPrice": 8016,
"medianPrice": 8097,
"minPrice": 7000,
"maxPrice": 8866,
"listingCount": 6306,
"totalQuantity": null,
"volume": null,
"bestBidCents": 7735,
"bestAskCents": 7000,
"spreadBps": null,
"netBestBidCents": 7348,
"netSpreadBps": null
}
]
}
},
"errors": {}
}