Skip to main content
POST
以您自定的价格将您自己的 CS2 物品发布到 CSBoard P2P 市场。可以发送单件物品,也可以用 { "items": [...] } 批量发送最多 50 件。请从 GET /v1/p2p/inventory 获取 operational_asset_id 和 asset_revision,并原样发送。 需要身份验证。 请将密钥作为 Authorization: Bearer csb_pub_... 发送。免费——任何有效密钥均可,无余额要求,也无需交易权限。

卖家规则

与网站相同的规则同样适用:
  • 已验证的邮箱或已绑定的 Telegram,以便在物品售出时通知您;
  • CSBoard 扩展程序或应用能够发送 Steam 交易,且账户已启用 Steam 手机令牌;
  • 没有 P2P 冷却、暂停或店铺锁定;
  • 一份最新的库存读取结果(参见 GET /v1/p2p/inventory 中的 inventory_proof)。

价格下限

价格不得低于我们对该物品市场价的一半。在网站上,卖家在看到警告后可以确认更低的价格;通过 API 密钥则没有这种确认:更低的价格会返回 422 price_below_market,并附带 market_usd 和 floor_usd,方便您调整后重新发送。这种拒绝不会消耗您的 Idempotency-Key。如果我们没有该物品的市场价,则不设下限。 价格以美元计,范围 0.10 到 100000,精确到美分。12.345 会被拒绝,而不是被四舍五入。

幂等性

Idempotency-Key 为必填(8–128 个字符,每次发布请求唯一)。如果您用同一个键重新发送同一个请求,已发布的物品会按原样返回,而不会被重复上架。单件物品的重放返回 200,并带有 Idempotent-Replay: true 响应头。
  • 用同一个键发送不同的价格或修订版本,会返回 409 idempotency_key_mismatch。
  • 收到 409 idempotency_key_consumed 表示之前的某次尝试中途失败——请换一个新键重试。

响应

  • 单件物品: 返回 201 和挂单;重放时返回 200。
  • 批量: 始终返回 200,data 中每件物品一条结果。一件物品失败不会影响其他物品;失败的物品会带上它单独请求时会返回的 status 和 code。
写操作限制为每个密钥每分钟 30 次请求,与改价和下架共用。

示例请求

示例响应

错误代码

物品售出后会发生什么,请参阅 P2P 上架指南。

授权

Authorization
string
header
必填

Send your key as a Bearer token on every request: Authorization: Bearer csb_pub_.... Generate keys in your CSBoard profile.

请求头

Idempotency-Key
string
必填

Required, 8–128 characters, unique per publish request. Resending the same request with the same key returns each item that was already published instead of listing it twice. A key reused with a different price or revision answers 409 idempotency_key_mismatch; after 409 idempotency_key_consumed, use a new key. A 422 price_below_market refusal does not spend the key.

Required string length: 8 - 128

请求体

application/json
operational_asset_id
string
必填

The copy to list, from GET /p2p/inventory.

Maximum string length: 256
示例:

"5b0c1f7e-3d2a-4c8e-9a61-2f4d8b7e1c30"

asset_revision
string
必填

From GET /p2p/inventory, unchanged. If the item changed since you read it, the publish answers 409 asset_revision_changed — read the inventory again.

Required string length: 16 - 128
示例:

"sha256:fd0e6de607b774aaaf4d9cdb7e014c003ba614b03f0460b01e8c94bce034bac5"

price_usd
number
必填

Asking price in USD, whole cents (12.34; 12.345 is refused, not rounded). It may not be under half of our market price for the item — see price_below_market.

必填范围: 0.1 <= x <= 100000必须是以下数值的倍数 0.01

响应

A batch result, or a single item that was already published under this Idempotency-Key (header Idempotent-Replay: true).

data
object[]
success_count
integer
total_requested
integer