GET /v1/prices — 按商品组的 CS2 minAsk 价格列表
按市场哈希名称、磨损以及多普勒相位分组,分页获取 minAsk 价格快照,每行包含最低报价和挂单数量。
curl --request GET \
--url https://csboard.com/v1/prices \
--header 'Authorization: Bearer <token>'import requests
url = "https://csboard.com/v1/prices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://csboard.com/v1/prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://csboard.com/v1/prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://csboard.com/v1/prices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://csboard.com/v1/prices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://csboard.com/v1/prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"market_hash_name": "AK-47 | Redline (Field-Tested)",
"wear": "Field-Tested",
"doppler_phase": null,
"min_price_usd": 11.92,
"qty": 73
}
],
"next_cursor": null
}market_hash_name、wear 与 doppler_phase 的一个唯一组合,并附带当前最低报价以及挂单的数量。这使其非常适合用于构建比价表、告警管道或资产估值——您可以为成千上万的商品获取价格而无需拉取每条挂单。
需要身份验证。 请将密钥作为 Authorization: Bearer csb_pub_... 发送。
appId=570 读取 Dota 2,传入 appId=252490 读取 Rust。对这些游戏,每行对应一个 market_hash_name,wear 和 doppler_phase 为 null。参见游戏。每个名称只需要一个价格?GET /v1/public/prices 无需密钥即可使用。查询参数
730 = CS2,570 = Dota 2,252490 = Rust。不传则为 CS2。您的密钥可用的游戏请参见 GET /v1/games。market_hash_name 进行模糊匹配 —— 将查询拆分为多个词,并对每个词进行子串匹配。如果某个名称是更长商品名称的词子集(例如 Spectrum Case 与 Spectrum 2 Case),则无法通过此方式单独筛选;要精确查询,请使用 name。market_hash_name(不区分大小写)—— 单个商品的精确查询方式。name=Spectrum Case 仅返回 Spectrum Case 组,绝不会返回 Spectrum 2 Case。优先于 search。Rifle、Knife、Gloves。Factory New、Minimal Wear、Field-Tested、Well-Worn、Battle-Scarred 之一。仅限 CS2——在其他 appId 下发送会返回 400 invalid_param。Classified、Covert。min_price_usd,单位美元(含)。min_price_usd,单位美元(含)。next_cursor 值。1,最大 500。响应字段
cursor 传入。最后一页为 null。示例请求
curl "https://csboard.com/v1/prices?category=Rifle&wear=Field-Tested&limit=50" \
-H "Authorization: Bearer csb_pub_..."
示例响应
{
"items": [
{
"market_hash_name": "AK-47 | Redline (Field-Tested)",
"wear": "Field-Tested",
"doppler_phase": null,
"min_price_usd": 11.92,
"qty": 73
}
],
"next_cursor": null
}
错误代码
| HTTP 状态码 | 代码 | 含义 |
|---|---|---|
| 400 | invalid_param | 在 Dota 2 或 Rust 的 appId 下发送了 wear。 |
| 400 | unsupported_game | 您的密钥无法使用该 appId。supported_app_ids 列出了可用的值。 |
| 401 | missing_api_key, invalid_api_key | API 密钥缺失或无效。 |
| 429 | rate_limit_exceeded | 超过 30 次/分钟。请在重试前等待 Retry-After 响应头中的秒数。 |
GET /v1/listings 获取特定商品权威的实时报价。授权
Send your key as a Bearer token on every request: Authorization: Bearer csb_pub_.... Generate keys in your CSBoard profile.
查询参数
Steam appId of the game. 730 = CS2 (the default), 570 = Dota 2, 252490 = Rust. Omit it and the endpoint answers for CS2 exactly as before. An appId this key may not use answers 400 unsupported_game, whose supported_app_ids lists the ones it may — see GET /games.
730, 570, 252490 Full-text match on market hash name.
Exact market_hash_name (case-insensitive) — the precise single-item lookup. Unlike fuzzy search, it isolates one item even when its name is a word-subset of a longer one (e.g. Spectrum Case vs Spectrum 2 Case). Takes precedence over search.
e.g. Rifle, Knife, Gloves.
Item wear bucket. CS2 only — sent with another appId it answers 400 invalid_param.
Factory New, Minimal Wear, Field-Tested, Well-Worn, Battle-Scarred e.g. Classified, Covert.
Minimum price in USD.
Maximum price in USD.
Keyset cursor from next_cursor.
1–500. Default 100.
1 <= x <= 500curl --request GET \
--url https://csboard.com/v1/prices \
--header 'Authorization: Bearer <token>'import requests
url = "https://csboard.com/v1/prices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://csboard.com/v1/prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://csboard.com/v1/prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://csboard.com/v1/prices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://csboard.com/v1/prices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://csboard.com/v1/prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"market_hash_name": "AK-47 | Redline (Field-Tested)",
"wear": "Field-Tested",
"doppler_phase": null,
"min_price_usd": 11.92,
"qty": 73
}
],
"next_cursor": null
}