CS2DT饰品开放平台
🇺🇸 English
  • 🇨🇳简体中文
  • 🇺🇸 English
首页商户中心
首页商户中心
🇺🇸 English
  • 🇨🇳简体中文
  • 🇺🇸 English
  1. purchase related interface
  • Response codes
  • CS2DT Open Platform Access Guide
  • v1
    • user related interface
      • Steam account status query Copy
      • User balance query
      • Create Steam account status check
      • Steam account status query
    • market prodcut related interface
      • CS2 Style Data
      • get full Items
      • Market Search
      • item price query
      • all the filters query
      • item for sale list query
      • Get the sales status of the product
      • Batch query of products on sale by product ID
      • Get the sales details of a product
    • purchase related interface
      • buy item
        POST
      • quick buy item
        POST
    • order related interface
      • buyer order list v2
      • buyer order list
      • buyer order detail
      • buyer cancel order
    • callback related
      • Callback Notification Service Description
    • exchange rate
      • USD/CNY exchange rate
    • websocket
      • How to Use WebSocket
      • Get WSS Address
  1. purchase related interface

buy item

POST
https://openapi.cs2dt.com/v1/trade/v2/buy
If you purchase a single item using the product id in the sales list interface, the purchase may encounter error codes enum in Status. The error codes generated by the purchase may be described in the response code below
To support switching between Chinese and English, you need to add a parameter named "language" with the value "en_US" in the request header. This will allow you to receive English information responses for purchase failure scenarios.
response code:106505 user’s steam account can’t trade
response code:140005 wrong trade url format
response code:106509 user’s steam account’s inventory is private
response code:106310 user’s steam’s steam trade url is invalid
response code:106516 user’s steam open the steam family view
response code:106517 user’s steam locked by steam
response code:106006 user’s steam was vac by steam
response code:70001 balance is not enough
response code:1367 This Steam account has been temporarily restricted from making purchases due to repeated non-receipt or refusal of purchase orders in the past 12 hours. This restriction will be lifted after 'n' hours
response code: 140024 The merchant order is currently being processed. Please wait for a callback or tocheck for updates after 1 minute.
response code: 140014 The merchant order number already exists.
response code: 1369 The Steam account was tagged for fraudulent activities and cannot make purchases.
response code: 105001 Item sold or removed already.
response code: 1708 You passed a wrong price parameter!
response code: 1317 No items for sale met the specified criteria.
response code: 1014452 The item has been unlisted by seller.
response code: 103011 The Steam account is unable to trade. You can check the specific error reason in the "errorData" field.
response code: 70001 Insufficient balance
response code: 1454 The market price of the item exceeds the maximum purchase price.
response code: 1403 The item price has changed. Please proceed with a new purchase.
response code: 1207 The item has been sold or removed!
response code: 100000 Server error!
response code: 1363 Server error! Purchase failed
response code: 201445 A purchase exception has left the payment status unknown. Please wait for a callback or to check for updates after 1 minute.
response code: 1010324 This trade link is invalid and cannot be used. Please ask the buyer to update the link.

请求参数

Query 参数
app-key
string 
可选
默认值:
{{app-key}}
Body 参数application/json
outTradeNo
string  | null 
必需
The merchant order number must be unique
tradeUrl
string  | null 
必需
Buyer steam tradeUrl
productId
integer  | null 
必需
on sell id (not use number type)
buyPrice
number  | null 
可选
Purchase price, optional parameter, used to verify the price. If this parameter is passed, it will be compared with the price in the database. If it is inconsistent, the purchase fails
maxPrice
number  | null 
可选
If this parameter is passed, the buyPrice effect will be invalid; If price field is provided we are going to purchase item with the same or lower price
示例
{
    "outTradeNo": "string",
    "tradeUrl": "string",
    "productId": 0,
    "buyPrice": 0,
    "maxPrice": 0
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://openapi.cs2dt.com/v1/trade/v2/buy?app-key=' \
--header 'Content-Type: application/json' \
--data-raw '{
    "outTradeNo": "string",
    "tradeUrl": "string",
    "productId": 0,
    "buyPrice": 0,
    "maxPrice": 0
}'

返回响应

🟢200成功
application/json
Body
success
boolean  | null 
可选
Is request successful
data
object (OpenBuyResultDTO) 
可选
Business data
buyPrice
number  | null 
可选
购买实际支付金额(T币)
orderId
string  | null 
订单id
可选
delivery
integer  | null 
可选
发货模式,1=人工,2自动
offerId
string  | null 
可选
如果购买自动发货物品时选择了立即发送报价,则会返回这个offerId,可以使用报价详情接口查看
errorCode
integer  | null 
可选
Error code
errorMsg
string  | null 
可选
Error message
errorData
object (Object) 
可选
Error data,when errorCode is not equals to 0,maybe this property will have a value
示例
{
  "success": false,
  "data": {
    "buyPrice": 0.0,
    "orderId": "",
    "delivery": 0,
    "offerId": ""
  },
  "errorCode": 0,
  "errorMsg": "",
  "errorData": {}
}
修改于 2025-01-03 06:40:52
上一页
Get the sales details of a product
下一页
quick buy item
Built with