交易
GET /v1/orders — 列出您的购买历史
使用键集分页翻阅您的 CSBoard 购买历史。可按时间区间和状态过滤;每个订单包含逐件商品的交付详情。
GET
/
orders
List purchase history
curl --request GET \
--url https://csboard.com/v1/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://csboard.com/v1/orders"
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/orders', 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/orders",
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/orders"
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/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://csboard.com/v1/orders")
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{
"data": [
{
"order_id": "ord_01J9Z3K8Q2",
"steam_id": "76561198000000000",
"status": "completed",
"custom_id": "batch-2026-06-29-01",
"currency": "USD",
"charged_total_usd": 26.47,
"item_count": 2,
"hold_until": null,
"created_at": "2026-06-29T17:12:04Z",
"updated_at": "2026-06-29T17:15:40Z",
"items": [
{
"market_hash_name": "AK-47 | Redline (Minimal Wear)",
"price_usd": 14.37,
"status": "delivered",
"tradable_at": "2026-07-06T12:00:00Z",
"return_reason": null,
"steam_trade_offer_id": "5512345678",
"steam_trade_offer_finished_at": "2026-06-29T17:15:40Z"
}
]
}
],
"meta": {
"next_cursor": "eyJpZCI6Im9yZF8wMUo5WjNLOFEyIn0=",
"per_page": 50
}
}{
"code": "unauthorized",
"message": "Missing or invalid API key."
}{
"code": "invalid_request",
"detail": "limit must be between 1 and 100."
}{
"code": "rate_limit_exceeded",
"message": "Too many requests."
}orders 端点返回您的购买历史,按时间倒序排列,使用键集分页。可按时间窗口和状态过滤,然后通过将
meta.next_cursor 作为 cursor 传回,遍历更早的页面。每个订单都附带逐件商品明细及其交付状态。
需要身份验证。 请将密钥作为 Authorization: Bearer csb_pub_... 发送。
查询参数
integer
默认值:"50"
每页结果数。最小
1,最大 100。integer
仅返回在该 Unix 时间戳(秒)当时或之后创建的订单。
integer
仅返回在该 Unix 时间戳(秒)当时或之前创建的订单。
string
按订单状态过滤。可选值:
completed、hold、delivering、pending、cancelled、failed 之一。string
来自上次响应中
meta.next_cursor 的键集游标。传入以获取下一页。响应字段
Order[]
必填
本页订单数组。
显示 Order object
显示 Order object
string
必填
CSBoard 订单 id。
string | null
商品交付到的 Steam ID(如已知)。
string
必填
可选值:
completed、hold、delivering、pending、cancelled、failed 之一。string | null
您在下单时设置的自定义 id(如有)。
string
必填
始终为
"USD"。number
必填
订单的扣款总额,单位美元。
integer
必填
订单中的商品数量。
datetime | null
订单中冻结商品的解冻时间,否则为
null。datetime
必填
ISO 8601 创建时间戳。
datetime | null
最后一次更新的 ISO 8601 时间戳,否则为
null。OrderItem[]
必填
示例请求
curl "https://csboard.com/v1/orders?status=completed&limit=50" \
-H "Authorization: Bearer csb_pub_..."
示例响应
{
"data": [
{
"order_id": "ord_01J9Z3K8Q2",
"steam_id": "76561198000000000",
"status": "completed",
"custom_id": "batch-2026-06-29-01",
"currency": "USD",
"charged_total_usd": 26.47,
"item_count": 2,
"hold_until": null,
"created_at": "2026-06-29T17:12:04Z",
"updated_at": "2026-06-29T17:15:40Z",
"items": [
{
"market_hash_name": "AK-47 | Redline (Minimal Wear)",
"price_usd": 14.37,
"status": "delivered",
"tradable_at": "2026-07-06T12:00:00Z",
"return_reason": null,
"steam_trade_offer_id": "5512345678",
"steam_trade_offer_finished_at": "2026-06-29T17:15:40Z"
}
]
}
],
"meta": { "next_cursor": "eyJpZCI6Im9yZF8wMUo5WjNLOFEyIn0=", "per_page": 50 }
}
错误代码
| HTTP 状态码 | 代码 | 含义 |
|---|---|---|
| 401 | missing_api_key / invalid_api_key | API 密钥缺失或无效。 |
| 422 | invalid_request | 查询参数无效(例如 limit 超出范围)。 |
| 429 | rate_limit_exceeded | 请求过多。请按照 Retry-After 响应头中的秒数退避。 |
授权
Send your key as a Bearer token on every request: Authorization: Bearer csb_pub_.... Generate keys in your CSBoard profile.
查询参数
Results per page. 1–100. Default 50.
必填范围:
1 <= x <= 100Only orders created at or after this Unix timestamp (seconds).
Only orders created at or before this Unix timestamp (seconds).
Filter by order status.
可用选项:
completed, hold, delivering, pending, cancelled, failed Keyset cursor from a previous response's meta.next_cursor.
⌘I
List purchase history
curl --request GET \
--url https://csboard.com/v1/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://csboard.com/v1/orders"
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/orders', 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/orders",
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/orders"
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/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://csboard.com/v1/orders")
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{
"data": [
{
"order_id": "ord_01J9Z3K8Q2",
"steam_id": "76561198000000000",
"status": "completed",
"custom_id": "batch-2026-06-29-01",
"currency": "USD",
"charged_total_usd": 26.47,
"item_count": 2,
"hold_until": null,
"created_at": "2026-06-29T17:12:04Z",
"updated_at": "2026-06-29T17:15:40Z",
"items": [
{
"market_hash_name": "AK-47 | Redline (Minimal Wear)",
"price_usd": 14.37,
"status": "delivered",
"tradable_at": "2026-07-06T12:00:00Z",
"return_reason": null,
"steam_trade_offer_id": "5512345678",
"steam_trade_offer_finished_at": "2026-06-29T17:15:40Z"
}
]
}
],
"meta": {
"next_cursor": "eyJpZCI6Im9yZF8wMUo5WjNLOFEyIn0=",
"per_page": 50
}
}{
"code": "unauthorized",
"message": "Missing or invalid API key."
}{
"code": "invalid_request",
"detail": "limit must be between 1 and 100."
}{
"code": "rate_limit_exceeded",
"message": "Too many requests."
}