Steam Online!

可自动交易的API v2.0

目录内容

创建API密钥
价格表
按购买订单class/instance 类/实例分类的价格清单
买卖装备
add-to-sale - 发布待售装备
set-price - 更新价格或取消销售
remove-all-from-sale - 从销售中删除所有装备
my-inventory - 可出售装备
items - 装备清单
ping - 包括销售
trade-request-take - 请求提供获取装备的报价
trade-request-give - 请求提供转售装备的报价
trade-request-give-p2p - 要求提供资料以将商品转售给买方
trade-request-give-p2p-all - Запросить данные для передачи всех купленных предметов
trades - 发送给您的交换报价清单
buy - 购买装备
buy-for - 购买装备并转移给其他用户
get-buy-info-by-custom-id - информация о статусе покупки предмета, по уникальному ID
get-list-buy-info-by-custom-id - информация о статусе покупки предмета, по уникальным ID
history - 购买与销售历史记录
test - 核验销售物品的条件
get-list-items-info - 按Hash哈希名称查询装备销售记录
操作帐户
get-money - 余额
go-offline - 停止交易
update-inventory - 更新库存
transfer-discounts - перенос скидок
get-my-steam-id - узнать свой steamid32 и steamid64
按名称搜索装备
search-item-by-hash-name - 按照装备搜索
search-item-by-hash-name-specific - Поиск по market-hash-name предметов выставленных по assetid
search-list-items-by-hash-name-all - Поиск по списку market-hash-name

创建API密钥

很重要! 如果您在1秒之内向我们的服务器发送5个以上请求,则您的密钥将被删除。 可以查看最近20分钟内的API请求列表 在这里').

在这里,您可以创建/重新创建用于自动交易的私钥,该私钥将绑定到您的帐户。

您不明白为什么需要钥匙?为了个人安全,请不要将其告诉任何人。

在测试模式下,可以开始销售应用程序,这样就可以在我们的网站上自动进行交易 - CounterBot.

使用API,即表示您同意以下条款 合同, 其中,保修期是4小时.

注意事项! 要创建密钥,请登录: https://market.csgo.com/login

价格表

prices

json格式的价格表。

申请示例

https://market.csgo.com/api/v2/prices/RUB.json

https://market.csgo.com/api/v2/prices/USD.json

https://market.csgo.com/api/v2/prices/EUR.json

按购买订单class/instance 类/实例分类的价格清单

prices/class_instance

json格式的价格清单,其中 buy_order 是该装备的最低报价。

申请示例

https://market.csgo.com/api/v2/prices/class_instance/RUB.json

https://market.csgo.com/api/v2/prices/class_instance/USD.json

https://market.csgo.com/api/v2/prices/class_instance/EUR.json

答复示例:
{
    success: true,
    time: 1565103435,
    currency: "RUB",
    items: {
        1434515088_0: {
            price: "0.50",
            buy_order: "0.10",
            avg_price: "0.74",
            popularity_7d: "47",
            market_hash_name: "Arcane Defiance Loading Screen",
            ru_name: "Загрузочный экран «Arcane Defiance»",
            ru_rarity: "Common",
            ru_quality: "Standard",
            text_color: "D2D2D2",
            bg_color: "",
        },
        1479313949_0: {
            price: "0.60",
            buy_order: "0.10",
            avg_price: "0.94",
            popularity_7d: "13",
            market_hash_name: "Armor of Utter Eradication",
            ru_name: "Armor of Utter Eradication",
            ru_rarity: "Uncommon",
            ru_quality: "Standard",
            text_color: "D2D2D2",
            bg_color: "",
        }
    }
}
                    

买卖装备

trade-request-take

创建一个请求,以转移机器人手中的已购装备。

申请示例

https://market.csgo.com/api/v2/trade-request-take?key=[your_secret_key][&bot=botid]

请求参数:
  • botid — 计划获取装备的机器人的ID(参数是可选的)。
答复示例:
{ "success": true,
                          "trade": "1704976549",
                          "nick": "NIPFribergEZIO",
                          "botid": "354589802",
                          "profile": "https://steamcommunity.com/profiles/76561198314855530/",
                          "secret": "1J10",
                          "items": [ "1812819920_188530170",
                             "2082539396_188530139",
                             "2048839018_902658099"
                           ]
                        }
可能的错误:
  • 3001 — 没有可转让的装备。
trade-request-give

创建一个请求,以将购买的商品转移给机器人

申请示例

https://market.csgo.com/api/v2/trade-request-give?key=[your_secret_key]

答复示例:
{
                          "success": true,
                          "trade": "1704976549",
                          "nick": "NIPFribergEZIO",
                          "botid": "354589802",
                          "profile": "https://steamcommunity.com/profiles/76561198314855530/",
                          "secret": "1J10",
                          "items": [
                             15060788266
                          ]
                        }
trade-request-give-p2p

要求提供资料以将商品转售给买方(仅限CS:GO, Dota2)

申请示例

https://market.csgo.com/api/v2/trade-request-give-p2p?key=[your_secret_key]

答复示例:
{
                          "success": true,
                          "hash" : "234234234/wefsdgsd",
                          "offer" : {
                            "partner" : 12345,
                            "token" : "fffffff",
                            "tradeoffermessage" : "sdfsdf . . . 234234234/wefsdgsd",
                            "items" : [
                            {
                              "appid" : 730,
                              "contextid" : 2,
                              "assetid" : 23452345,
                              "amount" : 1}
                            ]
                          }
                        }
trade-request-give-p2p-all

Возвращает данные для создания всех тейдов (только для CS:GO и Dota2)

申请示例

https://market.csgo.com/api/v2/trade-request-give-p2p-all?key=[your_secret_key]

答复示例:
{
                          "success": true,
                          "hash" : "234234234/wefsdgsd",
                          "offers" : [
                            {
                                "partner" : 12345,
                                "token" : "fffffff",
                                "tradeoffermessage" : "sdfsdf . . . 234234234/wefsdgsd",
                                "items" : [
                                {
                                  "appid" : 730,
                                  "contextid" : 2,
                                  "assetid" : 23452345,
                                  "amount" : 1}
                                ]
                            },
                            {
                                "partner" : 123456,
                                "token" : "fffffff",
                                "tradeoffermessage" : "sdfsdf . . . 234234234/wefsdas",
                                "items" : [
                                {
                                  "appid" : 730,
                                  "contextid" : 2,
                                  "assetid" : 23452346,
                                  "amount" : 1}
                                ]
                            }
                        ]}
                    
ping

启用销售必须每3分钟发送一次。

申请示例

https://market.csgo.com/api/v2/ping?key=[your_secret_key]

答复示例:
{
                "success": true,
                "ping": "pong"
                }
go-offline

停止销售装备。

申请示例

https://market.csgo.com/api/v2/go-offline?key=[your_secret_key]

my-inventory

仅获取尚未出售的装备库存。

申请示例

https://market.csgo.com/api/v2/my-inventory/?key=[your_secret_key]

答复示例:
{
                            "success": true,
                            "items": [
                                {
                                    "id": "14933635912",
                                    "classid": "310776767",
                                    "instanceid": "0",
                                    "market_hash_name": "SCAR-20 | Carbon Fiber (Factory New)",
                                    "market_price": 10.34,
                                    "tradable": 1
                                }
                    ]}
回复说明:
  • id — 待售ID(资产)(请参见方法add-to-sale
  • market_price — 推荐售价
add-to-sale

展出一个待售装备。要获取要参展的装备清单,请使用以下方法 my-inventory.

申请设备的示例:

https://market.csgo.com/api/v2/add-to-sale?key=[your_secret_key]&id=[id]&price=[price]&cur=[currency]

请求参数:
  • [id] — 装备ID,此装备可以在库存的物品描述中找到。
  • [price] — 整数金额(1 美元 = 1000 1 卢布 = 100 1 欧元= 1000)
  • [currency] — валюта (RUB, USD, EUR) дополнительная проверка, если будет указана не равная текущей установленной в вашем аккаунте, покупка не произойдет. Это защита от потери денег в случае, если вы сменили валюту на вашем аккаунте и забыли про API
答复示例:
                        {"success":true,"item_id":136285662}
                    
                        {"success":false,"error":"bad_request"}
                    
可能的错误:
  • bad_input - 参数不正确
  • inventory_not_loaded - 需要更新库存
  • item_not_recieved - 需要更新库存
  • no_description_found - Steam没有撤回装备描述,请稍后再试
  • item_not_inserted - 未成功出售
  • item_not_in_inventory — 在库存中找不到装备,请尝试使用此方法更新 UpdateInventory 等待10-20秒,然后重试。
  • bad_request — 价格不正确或根本没有指定价格
set-price

为装备设置新价格或取消销售。

申请设备的示例:

https://market.csgo.com/api/v2/set-price?key=[your_secret_key]&item_id=[item_id]&price=[price]&cur=[currency]

请求参数:
  • [item_id] — 装备ID,此装备可以在库存的物品描述中找到。
  • [price] — 整数金额(1 美元 = 1000 1 卢布 = 100 1 欧元 = 1000)如果您设定金额为0,则该装备将从销售中删除
  • [currency] — 货币(卢布 美元 欧元),如果购买金额不是当前的设定金额,则不用进行额外检查。
答复示例:
                        {"success":true}
                    
                        {"success":false,"error":"bad_item"}
                    
可能的错误:
  • bad_item - 找不到此ID装备
remove-all-from-sale

立刻从销售中删除所有装备。

很重要! 需要重新发布装备。如果您想暂时停止交易-请使用此方法 go-offline.
申请示例

https://market.csgo.com/api/v2/remove-all-from-sale?key=[your_secret_key]

答复示例:
{"count":4, "success":true}
回复说明:
  • count — 如果未显示任何装备,则表示从销售中删除的装备数量为0
items

装备清单:

申请示例

https://market.csgo.com/api/v2/items?key=[your_secret_key]

答复示例:
{
    "success": true,
    "items": [
        {
            "item_id": "286316844",
            "assetid": "15092687536",
            "classid": "637317999",
            "instanceid": "630912635",
            "real_instance": "1629337655",
            "market_hash_name": "Horns of Monstrous Reprisal",
            "position": 0,
            "price": 4,
            "currency": "USD",
            "status": "1",
            "live_time": 920,
            "left": null,
            "botid": "0"
        }]}
                            
可能的等级:
  • status = 1 — 该物品正在出售。
  • status = 2 — 您已售出物品,需将其转移给机器人。
  • status = 3 — 等待将您从卖方购买的物品转给机器人。
  • status = 4 — 您可以领取已购买的物品。
回复说明:
  • item_id — 我们系统中的装备ID
  • status — 装备等级(见上文)
  • price — 您的价格
  • position — 排序(按最低价排序),在购买时选择最便宜的装备。
  • botid — 装备等级为4的机器人ID。
  • assetid — 机器人库存中的装备ID。
  • left — 转移装备后仍有时间,卖方如果取消之前的操作,则这笔钱将退还给买方。卖方则会被惩罚。
trades

获取账户市场已发布装备的当前交易报价清单,您需要在Steam确认中确认报价。

Параметры запроса:
  • [extended] — extended info
申请示例

https://market.csgo.com/api/v2/trades/?key=[your_secret_key]

https://market.csgo.com/api/v2/trades/?key=[your_secret_key]&extended=1

答复示例:
{
            "success": true,
            "trades": [
                {
                    "dir": "in",
                    "trade_id": "1705069832",
                    "bot_id": "354486743",
                    "timestamp": 23423423423
                }
            ]
        }
With flag extended
{"success":true,"trades":[{"dir":"out","trade_id":"3759667687","bot_id":"1022850783","timestamp":1572021797,"secret":"3R5U","nik":"teresiacais","list_item_id":{"361847026":{"id":"361847026","assetid":"17737368051","classid":"284952881","instanceid":"1625510296"},"361851594":{"id":"361851594","assetid":"17737368059","classid":"284952881","instanceid":"1625510296"}}},{"dir":"in","trade_id":"3759668212","bot_id":"1022850783","timestamp":1572021825,"secret":"EC58","nik":"teresiacais","list_item_id":{"381304045":{"id":"381304045","assetid":"8028182393","classid":"996701649","instanceid":"0"}}}]}
回复说明:
  • dir — 交易方向 in-转售已售装备; out-退回已购装备。
  • trade_id - SteamID交易报价
  • bot_id - 发送API的机器人的SteamID
buy

购买装备。在此系统中,每个请求只能购买一个装备。

申请示例

https://market.csgo.com/api/v2/buy?key=[your_secret_key]&hash_name=[market_hash_name]&price=[price]

申请示例

https://market.csgo.com/api/v2/buy?key=[your_secret_key]&id=[id]&price=[price]

请求参数:
  • [market_hash_name] — market_hash_name装备ID。
  • [id] — id предмета.
  • [price] — 金额以戈比为单位(1卢布= 100 1美元= 1000 1欧元= 1000)设置代售装备的价格为整数,或者您可以设定任意高于最便宜报价的价格。在第二种情况下买方将以最低价格购买装备。
  • custom_id - ваш уникальный ID (string[50]), по нему можно будет узнать статус операции (не обязательный параметр!)
答复示例:
{
                        "success": true,
                        "id": "136256960"
                    }
回复说明:
  • id - 装备ID
buy-for

购买装备并将其转售给其他用户。仅限CS:GO, Dota2

申请示例

https://market.csgo.com/api/v2/buy-for?key=[your_secret_key]&hash_name=[market_hash_name]&price=[price]&partner=[partner]&token=[token]

申请示例

https://market.csgo.com/api/v2/buy-for?key=[your_secret_key]&id=[id]&price=[price]&partner=[partner]&token=[token]

请求参数:
  • [market_hash_name] — market_hash_name装备ID。
  • [id] — id предмета.
  • [price] — 金额以戈比为单位(1卢布= 100 1美元= 1000 1欧元= 1000)设置代售装备的价格为整数,或者您可以设定任意高于最便宜报价的价格。在第二种情况下买方将以最低价格购买装备。
  • partner=[partner]&token=[token] - 待收装备帐户的交易链接参数。
  • custom_id - ваш уникальный ID (string[50]), по нему можно будет узнать статус операции (не обязательный параметр!)
答复示例:
{
                        "success": true,
                        "id": "136256960"
                    }
回复说明:
  • id - 装备ID
get-buy-info-by-custom-id

Возвравщает информацию о статусе покупки

申请示例

https://market.csgo.com/api/v2/get-buy-info-by-custom-id?key=[your_secret_key]&custom_id=[custom_id]

请求参数:
  • [custom_id] — custom_id ваш уникальный ID заданый в методе (buy, buy-for)
答复示例:
{
    "success": true,
    "data": {
        "item_id": "534415936",
        "market_hash_name": "Spectrum 2 Case",
        "classid": "2521767801",
        "instance": "0",
        "time": "1548081954",
        "send_until" : null,
        "stage": "2",
        "paid": 0.5,
        "causer": null,
        "currency": "RUB",
        "for": "1234567",
        "trade_id": null
    }
}
回复说明:
  • trade_id - id активного trade_offer
  • for - steamid(32) кому передан предмет (если покупка быля через метод buy-for)
  • time - Unix Timestamp когда была куплена вещь
  • paid - по чем была куплена вещь
  • stage
    • TRADE_STAGE_NEW = 1
    • TRADE_STAGE_ITEM_GIVEN = 2
    • TRADE_STAGE_TIMED_OUT = 5
get-list-buy-info-by-custom-id

Возвравщает информацию о статусе покупки

申请示例

https://market.csgo.com/api/v2/get-list-buy-info-by-custom-id?key=[your_secret_key]&custom_id[]=[custom_id1]&custom_id[]=[custom_id2]

请求参数:
  • custom_id[] — custom_id ваш уникальный ID заданый в методе (buy, buy-for)
答复示例:
{
    "success": true,
    "data": {
        "custom_id": {
            "item_id": "534415936",
            "market_hash_name": "Spectrum 2 Case",
            "classid": "2521767801",
            "instance": "0",
            "time": "1548081954",
            "send_until" : null,
            "stage": "2",
            "paid": 0.5,
            "currency": "RUB",
            "for": "1234567",
            "trade_id": null
        }
    }
}
回复说明:
  • trade_id - id активного trade_offer
  • for - steamid(32) кому передан предмет (если покупка быля через метод buy-for)
  • paid - по чем была куплена вещь
  • time - Unix Timestamp когда была куплена вещь
  • stage
    • TRADE_STAGE_NEW = 1
    • TRADE_STAGE_ITEM_GIVEN = 2
    • TRADE_STAGE_TIMED_OUT = 5
history

所有平台的买卖历史记录

申请示例

https://market.csgo.com/api/v2/history?key=[your_secret_key]&date=12312314&date_end=12312714

申请示例

https://market.csgo.com/api/v2/history?key=[your_secret_key]&date=[DD-MM-YYYY]

请求参数:
  • [date] - 日期格式:DD-MM-YYYY 例如(10-08-1986)。 или UNIX_TIMESTAMP
  • [date_end] - UNIX_TIMESTAMP
答复示例:
{"success":true,"data":[{"item_id":"286316842","market_hash_name":"Maraxiform's Ire","class":"2274724615","instance":"57949762","time":"1546229560","event":"buy","app":"570","stage":"2","for":null,"custom_id":null,"paid":"72","currency":"RUB"}]}
回复说明:
  • app — 在哪个平台上购买了该装备
  • for — API转移对象的ID(如果通过buy-for方式进行购买)
  • stage
    • TRADE_STAGE_NEW = 1
    • TRADE_STAGE_ITEM_GIVEN = 2
    • TRADE_STAGE_TIMED_OUT = 5

操作帐户

get-money

获取余额总数及当前货币。

很重要! 对于货币美元欧元,将精确度设置为1000 ,即使用这些货币进行交易时,精确到小数点后3位
申请示例

https://market.csgo.com/api/v2/get-money?key=[your_secret_key]

答复示例 RUB:
{"money": 123.45, "currency": "RUB", "success": true}
答复示例 USD:
{"money": 123.456, "currency": "USD", "success": true}
答复示例 EUR:
{"money": 123.789, "currency": "EUR", "success": true}
go-offline

建议立即暂停交易,还应该断开与Web的连接。

申请示例

https://market.csgo.com/api/v2/go-offline?key=[your_secret_key]

答复示例:
{"success":true}
update-inventory

请求更新库存缓存(建议在接受交易报价之后再发送此请求)。

申请示例

https://market.csgo.com/api/v2/update-inventory/?key=[your_secret_key]

答复示例:
{"success":true}
transfer-discounts

Перенос скидок на другой аккаунт

申请示例

https://market.csgo.com/api/v2/transfer-discounts?key=[your_secret_key]&to=[his_secret_key]

请求参数:
  • [his_secret_key] - API ключ аккаунта на который производистя перенос скидок.
答复示例:
{"success":true}
get-my-steam-id

Узнать свой steamID

申请示例

https://market.csgo.com/api/v2/get-my-steam-id?key=[your_secret_key]

答复示例:
{
    "success": true,
    "steamid32": 123456,
    "steamid64": "1234123513245234"
}

搜索装备

search-item-by-hash-name

请求搜素一个装备的方案

申请示例

https://market.csgo.com/api/v2/search-item-by-hash-name?key=[your_secret_key]&hash_name=[market_hash_name]

请求参数:
  • [market_hash_name] - 可从Steam库存中获取的装备名称。
答复示例:
{
                        "success" : true,
                        "currency" : "RUB",
                        "list": [
                            {
                                "market_hash_name" : "ABC",
                                "price" : 400,
                                "class" : 93975063,
                                "instance" : 57944754,
                                "count" : 10
                            }
                        ]
                    }
search-item-by-hash-name-specific

请求搜素一个装备的方案

申请示例

https://market.csgo.com/api/v2/search-item-by-hash-name-specific?key=[your_secret_key]&hash_name=[market_hash_name]

请求参数:
  • [market_hash_name] - 可从Steam库存中获取的装备名称。
答复示例:
{
    "success": true,
    "currency": "USD",
    "data": [
        {
            "id": 521320033,
            "market_hash_name": "AWP | Worm God (Factory New)",
            "price": 3573,
            "class": 3088304936,
            "instance": 480085569,
            "extra": {
                "float": "0.061443410813808",
                "phase": "aq_awp_twine"
            }
        },
        {
            "id": 523494595,
            "market_hash_name": "AWP | Worm God (Factory New)",
            "price": 3604,
            "class": 1848971742,
            "instance": 480085569,
            "extra": {
                "float": "0.051711451262236",
                "phase": "aq_awp_twine"
            }
        },
        {
            "id": 522446815,
            "market_hash_name": "AWP | Worm God (Factory New)",
            "price": 4386,
            "class": 3033846573,
            "instance": 188530139,
            "extra": {
                "float": "0.038657382130623",
                "phase": "aq_awp_twine"
            }
        },
        {
            "id": 521834932,
            "market_hash_name": "AWP | Worm God (Factory New)",
            "price": 4386,
            "class": 3099667914,
            "instance": 188530139,
            "extra": {
                "float": "0.0054426062852144",
                "phase": "aq_awp_twine"
            }
        }
    ]
}
回复说明:
  • extra — 关于装备的其他资料
search-list-items-by-hash-name-all

Вариант для запроса по списку предметов

申请示例

https://market.csgo.com/api/v2/search-list-items-by-hash-name-all?key=[your_secret_key]&list_hash_name[]=[market_hash_name]

请求参数:
  • [market_hash_name] - 可从Steam库存中获取的装备名称。
答复示例:
{
    "success": true,
    "currency": "RUB",
    "data": {
         "USP-S | Lead Conduit (Well-Worn)": [
            {
            "id": 535992148,
            "price": "5100",
            "class": 3017010398,
            "instance": 188530139,
            "extra": {
                "float": "0.39269635081291",
                "phase": "gs_usp_voltage",
                "percent_success": "100.00",
                "average_time": "195"
            }
            }
         ]
    }
                }
回复说明:
  • extra — 关于装备的其他资料
  • percent_success — Процент успешных сделок продавца
  • average_time — Среднее время передачи продавца
get-list-items-info

Вариант для запроса по списку предметов

申请示例

https://market.csgo.com/api/v2/get-list-items-info?key=[your_secret_key]&list_hash_name[]=[market_hash_name]

请求参数:
  • [market_hash_name] - 可从Steam库存中获取的装备名称。
答复示例:
{
    "success": true,
    "currency": "RUB",
    "data": {
         "USP-S | Lead Conduit (Well-Worn)": {
                "max": "100",
                "min": 1,
                "average": 50,
                "history": [
                    [12312312312, 1.234], [12312312313, 1.234]
                ]
         }
    }
                }
回复说明:
  • max — max price
  • min — min price
  • history — sales history

其他

test

检查可能影响成功销售的所有障碍。

很重要! 所有商品参数都必须为" true",否则将无法出售商品。
申请示例

https://market.csgo.com/api/v2/test?key=[your_secret_key]

答复示例:
{

            "success": true,
            "status": {
                "user_token": true,
                "trade_check": true,
                "site_online": false,
                "site_notmpban": false
            }

        }
回复说明:
  • user_token — 是否创建交易链接
  • trade_check — 交易报价是否通过检查 - https://market.csgo.com/check/
  • site_online — 您在线吗 ping
  • site_notmpban — 禁止转移已售商品(1天内)

装备等级ITEM_STATUS

开发者社区

联系

群链接:

群链接:

vk.com/dev_market

Changelog