Steam Online!

API v2.0 for automated trading

Content

Creating an API key
Price list
Class/instance price list with buy orders
Buying/selling items
add-to-sale - put an item for sale
set-price - upgrade price or remove from sale
remove-all-from-sale - remove all items from sale
my-inventory - items available for sale
items - list of items
ping - enable sales
trade-request-take - request an offer get the item
trade-request-give - request an offer to transfer the item
trade-request-give-p2p - Request data to transfer the item to the buyer
trade-request-give-p2p-all - Запросить данные для передачи всех купленных предметов
trades - list of trade offers sent to you
buy - item purchase
buy-for - item purchase with transfer to another user
get-buy-info-by-custom-id - информация о статусе покупки предмета, по уникальному ID
get-list-buy-info-by-custom-id - информация о статусе покупки предмета, по уникальным ID
history - history of purchases and sales
test - check the requirements for item sale
get-list-items-info - get item sales history by class and instance
Account Actions
get-money - Balance
go-offline - Stop trading
update-inventory - update inventory
transfer-discounts - перенос скидок
get-my-steam-id - узнать свой steamid32 и steamid64
Search for items by name
search-item-by-hash-name - Search by one item
search-item-by-hash-name-specific - Поиск по market-hash-name предметов выставленных по assetid
search-list-items-by-hash-name-all - Поиск по списку market-hash-name

Creating an API key

IMPORTANT! If you send more than 5 requests per second to our server, your key will be deleted. List of API requests for the last 20 minutes can be viewed here').

Here you can create/recreate a private key for automated trading, which will be linked to your account.

If you do not understand why you need a key, then please, for your own safety, do not tell it to anyone.

The sale of the application is launched in the test mode, which allows you to automate trading on our website - CounterBot.

By using the API, you agree to the terms of the agreement, in particular, with a limited warranty of 4 hours.

Attention! To create a key, log in: https://market.dota2.net/login

Price list

prices

Price list in json format.

Request example:

https://market.dota2.net/api/v2/prices/RUB.json

https://market.dota2.net/api/v2/prices/USD.json

https://market.dota2.net/api/v2/prices/EUR.json

Class/instance price list with buy orders

prices/class_instance

The price list is in json format, where buy_order is the minimum buy order for this item.

Request example:

https://market.dota2.net/api/v2/prices/class_instance/RUB.json

https://market.dota2.net/api/v2/prices/class_instance/USD.json

https://market.dota2.net/api/v2/prices/class_instance/EUR.json

Sample answer:
{
    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"
        },
        1479313949_0: {
            price: "0.60",
            buy_order: "0.10",
            avg_price: "0.94",
            popularity_7d: "13",
            market_hash_name: "Armor of Utter Eradication"
        }
    }
}
                    

Buying/selling items

trade-request-take

Create a request for the transfer of purchased items that are at our bots.

Request example:

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

Request parameters:
  • botid — The ID of our bot from which you want to pick up items is optional.
Sample answer:
{ "success": true,
                          "trade": "1704976549",
                          "nick": "NIPFribergEZIO",
                          "botid": "354589802",
                          "profile": "https://steamcommunity.com/profiles/76561198314855530/",
                          "secret": "1J10",
                          "items": [ "1812819920_188530170",
                             "2082539396_188530139",
                             "2048839018_902658099"
                           ]
                        }
Possible errors:
  • 3001 — nothing to transfer.
trade-request-give

Create a request to transfer purchased items to our bot

Request example:

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

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

Request data to transfer the item to the buyer (only for CS:GO)

Request example:

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

Sample answer:
{
                          "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)

Request example:

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

Sample answer:
{
                          "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

Enable sales, you need to send every 3 minutes.

Request example:

https://market.dota2.net/api/v2/ping?key=[your_secret_key]

Sample answer:
{
                "success": true,
                "ping": "pong"
                }
go-offline

Stop selling items.

Request example:

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

my-inventory

Getting Steam inventory, only those items that you have not yet put up for sale.

Request example:

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

Sample answer:
{
                            "success": true,
                            "items": [
                                {
                                    "id": "14933635912",
                                    "classid": "310776767",
                                    "instanceid": "0",
                                    "market_hash_name": "SCAR-20 | Carbon Fiber (Factory New)",
                                    "market_price": 10.34,
                                    "tradable": 1
                                }
                    ]}
Details of the answer:
  • id — ID (assetid) for sale (see method add-to-sale)
  • market_price — recommended sale price
add-to-sale

Set item for sale. To get a list of items for selling, use the method my-inventory.

Sample request for putting up an item:

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

Request parameters:
  • [id] — Steam item ID, it can be found in the item description in your inventory on Steam.
  • [price] — amount, integer (1 USD=1000, 1 RUB=100, 1 EUR=1000)
  • [currency] — the currency (RUB, USD, EUR) an additional check, if specified is not equal to the current set the purchase will be cancelled. It is done to protect you from losing money if you change the currency in your account and forget about the API.
Sample answer:
                        {"success":true,"item_id":136285662}
                    
                        {"success":false,"error":"bad_request"}
                    
Possible errors:
  • bad_input - incorrect parameters
  • inventory_not_loaded - need to update inventory
  • item_not_recieved - need to update inventory
  • no_description_found - Steam did not return the item description; try again later
  • item_not_inserted - failed to put up for sale
  • item_not_in_inventory — The item is not found in the inventory, try to update it first using the method UpdateInventory and wait 10-20 seconds before trying again.
  • bad_request — Invalid price or not specified at all
set-price

Set a new price on the item, or remove from sale.

Sample request for putting up an item:

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

Request parameters:
  • [item_id] — Steam item ID, it can be found in the item description in your inventory on Steam.
  • [price] — amount, integer (1 USD=1000, 1 RUB=100, 1 EUR=1000), if you specify 0, the item will be removed from sale
  • [currency] — the currency (RUB, USD, EUR) an additional check, if specified is not equal to the current set the purchase will be cancelled.
Sample answer:
                        {"success":true}
                    
                        {"success":false,"error":"bad_item"}
                    
Possible errors:
  • bad_item - item with this ID is not found
remove-all-from-sale

Removing all items at once from the sale.

IMPORTANT! Items will need to be put up for sale again. If you want to stop trading for a while, use the method go-offline.
Request example:

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

Sample answer:
{"count":4, "success":true}
Details of the answer:
  • count — The number of items that were removed from sale, 0 if there are no items for sale
items

List of items:

Request example:

https://market.dota2.net/api/v2/items?key=[your_secret_key]

Sample answer:
{
    "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"
        }]}
                            
Possible statuses:
  • status = 1 — Item is set for sale.
  • status = 2 — You sold the item and must give it to the bot.
  • status = 3 — Waiting for the transfer of the item you bought from the seller to the bot.
  • status = 4 — You can pick up the purchased item.
Details of the answer:
  • item_id — Item ID in our system
  • status — item status (see above)
  • price — your price
  • position — position in the sales queue (sorting by price from lowest), the cheapest item is selected at the time of purchase.
  • botid — ID of the bot which has the item in status 4.
  • assetid — Item ID in the bot inventory.
  • left — Time left to trade the item, after this operation will be cancelled and the money will be returned to the buyer. Penalty points will be given
trades

Get a list of trade offers that are currently sent to your account by the Market and are awaiting confirmation on Steam.

Параметры запроса:
  • [extended] — extended info
Request example:

https://market.dota2.net/api/v2/trades/?key=[your_secret_key]

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

Sample answer:
{
            "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"}}}]}
Details of the answer:
  • dir — The direction of the trade: in - transfer of the item that was sold; out - the withdrawal of the item that was purchased.
  • trade_id - Trade offer SteamID
  • bot_id - SteamID of our bot that sent it
buy

Item purchase. In our system, it is possible to purchase only one item per request.

Request example:

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

Request example:

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

Request parameters:
  • [market_hash_name] — market_hash_name item identifiers.
  • [id] — id предмета.
  • [price] — the price in kopecks (1 RUB=100, 1 USD=1000, 1 EUR=1000) is an integer number of some lot already put up for sale, or you can specify any amount greater than the price of the cheapest lot, in the second case the item with the lowest price will be purchased.
  • custom_id - your unique ID (string [50]), it will be possible to track your buy operation (optional parameter!)
Sample answer:
{
                        "success": true,
                        "id": "136256960"
                    }
Details of the answer:
  • id - Item ID
buy-for

Item purchase and it`s transfer to another user. Only for CS:GO

Request example:

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

Request example:

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

Request parameters:
  • [market_hash_name] — market_hash_name item identifiers.
  • [id] — id предмета.
  • [price] — the price in kopecks (1 RUB=100, 1 USD=1000, 1 EUR=1000) is an integer number of some lot already put up for sale, or you can specify any amount greater than the price of the cheapest lot, in the second case the item with the lowest price will be purchased.
  • partner=[partner]&token=[token] - parameters of the trade link of the account that will receive the item.
  • custom_id - your unique ID (string [50]), it will be possible to track your buy operation (optional parameter!)
Sample answer:
{
                        "success": true,
                        "id": "136256960"
                    }
Details of the answer:
  • id - Item ID
get-buy-info-by-custom-id

Returns purchase status information

Request example:

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

Request parameters:
  • [custom_id] — custom_id is your unique ID set in the method (buy, buy-for)
Sample answer:
{
    "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
    }
}
Details of the answer:
  • 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

Returns purchase status information

Request example:

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

Request parameters:
  • custom_id[] — custom_id is your unique ID set in the method (buy, buy-for)
Sample answer:
{
    "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
        }
    }
}
Details of the answer:
  • 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

History of purchases and sales at all sites

Request example:

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

Request example:

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

Request parameters:
  • [date] - the date in the DD-MM-YYYY format, for example (10-08-1986). или UNIX_TIMESTAMP
  • [date_end] - UNIX_TIMESTAMP
Sample answer:
{"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"}]}
Details of the answer:
  • app — on which site the item was purchased
  • for — ID of the user to whom it was transferred (if the purchase was made using the buy-for method)
  • stage
    • TRADE_STAGE_NEW = 1
    • TRADE_STAGE_ITEM_GIVEN = 2
    • TRADE_STAGE_TIMED_OUT = 5

Account Actions

get-money

Get the amount on the balance and current currency.

IMPORTANT! For USD and EUR currencies, there is an accuracy of 1000, which means that calculations while trading in these currencies is carried out with 3 (three) digits after the decimal point.
Request example:

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

Sample answer for RUB:
{"money": 123.45, "currency": "RUB", "success": true}
Sample answer for USD:
{"money": 123.456, "currency": "USD", "success": true}
Sample answer for EUR:
{"money": 123.789, "currency": "EUR", "success": true}
go-offline

Immediately suspend the bidding, we also recommend disconnecting from the websockets.

Request example:

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

Sample answer:
{"success":true}
update-inventory

Request inventory cash update (it is recommended to do after each accepted trade offer).

Request example:

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

Sample answer:
{"success":true}
transfer-discounts

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

Request example:

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

Request parameters:
  • [his_secret_key] - API ключ аккаунта на который производистя перенос скидок.
Sample answer:
{"success":true}
get-my-steam-id

Узнать свой steamID

Request example:

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

Sample answer:
{
    "success": true,
    "steamid32": 123456,
    "steamid64": "1234123513245234"
}

Search for items

search-item-by-hash-name

Option to request a single item

Request example:

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

Request parameters:
  • [market_hash_name] - Item name, it can be taken from the Steam inventory.
Sample answer:
{
                        "success" : true,
                        "currency" : "RUB",
                        "list": [
                            {
                                "market_hash_name" : "ABC",
                                "price" : 400,
                                "class" : 93975063,
                                "instance" : 57944754,
                                "count" : 10
                            }
                        ]
                    }
search-item-by-hash-name-specific

Option to request a single item

Request example:

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

Request parameters:
  • [market_hash_name] - Item name, it can be taken from the Steam inventory.
Sample answer:
{
    "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"
            }
        }
    ]
}
Details of the answer:
  • extra — Additional data on the subject
search-list-items-by-hash-name-all

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

Request example:

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

Request parameters:
  • [market_hash_name] - Item name, it can be taken from the Steam inventory.
Sample answer:
{
    "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"
            }
            }
         ]
    }
                }
Details of the answer:
  • extra — Additional data on the subject
  • percent_success — Процент успешных сделок продавца
  • average_time — Среднее время передачи продавца
get-list-items-info

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

Request example:

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

Request parameters:
  • [market_hash_name] - Item name, it can be taken from the Steam inventory.
Sample answer:
{
    "success": true,
    "currency": "RUB",
    "data": {
         "USP-S | Lead Conduit (Well-Worn)": {
                "max": "100",
                "min": 1,
                "average": 50,
                "history": [
                    [12312312312, 1.234], [12312312313, 1.234]
                ]
         }
    }
                }
Details of the answer:
  • max — max price
  • min — min price
  • history — sales history

Additionally

test

Check all possible obstacles to the successful items selling.

IMPORTANT! All parameters must be "true", otherwise item selling is impossible.
Request example:

https://market.dota2.net/api/v2/test?key=[your_secret_key]

Sample answer:
{

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

        }
Details of the answer:
  • user_token — Is there a trade link set
  • trade_check — Has trade availability check been completed? - https://market.dota2.net/check/
  • site_online — Are you online on the site ping
  • site_notmpban — Indicator of absence of ban for not transferring sold items (for 24 hours)

ITEM_STATUS item statuses

Developer Communities

Vkontakte

We invite you to join the community of developers using API. In the group you can ask your community a question, talk directly with the market developers and learn more about the new features,

Link to group:

vk.com/dev_market

Changelog