Steam Online!

API v2.0 for automated trading

Content

Creating an API key
Price list (best offers)
Class/instance price list with buy orders
GetWSAuth - Get websocket token
GetWSToken - Get websocket token
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 salesdeprecated
ping-new - 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 - Request data to transfer all purchased items
trade-ready - registering your trade offer from Steam with us
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 - information about the purchase status of the item, by unique ID
get-list-buy-info-by-custom-id - information about the status of the item`s purchase list, by unique ID
history - history of purchases and sales
operation-history - history of all site operations
get-list-items-info - get item sales history by hash name
bid-ask - получить стакан по предмету
test - check the requirements for item sale
Buy orders
get-orders - get a list of your orders
set-order - add/change/delete an order
get-orders-log - history of executed orders
Account Actions
get-money - Balance
go-offline - Stop trading
update-inventory - update inventory
transfer-discounts - discount transfer
get-my-steam-id - find out your steamid32 and steamid64
set-pay-password - setting/changing payment password
money-send - balance transfer to another account
money-send-history - history of balance transfers
set-steam-api-key - bind the Steam API key to your accountdeprecated
set-trade-token - set trade link
change-currency - account currency change
get-api-key-via-access-token - get api keynew
Search for items by name
search-item-by-hash-name - Search by one item
search-item-by-hash-name-specific - Search by market-hash-name for items listed by assetid
search-list-items-by-hash-name-all - List search market-hash-name
Deposits and withdrawals
checkin-history - Getting the history of deposit operations
checkout-history - Getting the history of withdrawal operations

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.

You can pass the key in the GET parameter key, or, for greater security, in headers with the key X-API-KEY.

Attention! To create a key, log in: https://tf2.tm/login

Price list (best offers)

prices

Price list in json format.

Request example:

https://tf2.tm/api/v2/prices/RUB.json

https://tf2.tm/api/v2/prices/USD.json

https://tf2.tm/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 maximum buy order for this item.

Request example:

https://tf2.tm/api/v2/prices/class_instance/RUB.json

https://tf2.tm/api/v2/prices/class_instance/USD.json

https://tf2.tm/api/v2/prices/class_instance/EUR.json

Sample answer:
{
    "success": true,
    "time": 1565103435,
    "currency": "USD",
    "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": ""
        }
    }
}
                    

Buy orders

orders

List in json format.

Request example:

https://tf2.tm/api/v2/prices/orders/RUB.json

https://tf2.tm/api/v2/prices/orders/USD.json

https://tf2.tm/api/v2/prices/orders/EUR.json

Web sockets

Request example:

https://tf2.tm/api/v2/get-ws-auth?key=[your_secret_key]

get-ws-auth

On our site there is an opportunity to receive notifications, balance changes, new items for sale and more.

With the help of them you can only receive information, they work on a subscription model. To receive personal notifications, it is enough to send the key-token received by the method get-ws-auth

IMPORTANT! The key is valid for a limited time and after 60 seconds is no longer accepted by the server. If authorization fails on the notification server, the server will send the string: "auth"
Server to connect:

wss://wsn.dota2.net/wsn/

Connection steps:
  • 1) A connection is established with the server specified on the site.
  • 2) If you want to receive information related to your account, we send a key to our server, which can be obtained using the method GetWSAuth.
  • 3) If we just want ONLY the history of transactions or, for example, a list of new items, we need to send the name of the channel we want to subscribe to: by sending "newitems_tf" we will subscribe to new offers on the TF2 market. "history_tf" - subscribe to receive information about new transactions on the site
  • 4) If we subscribed to personal notifications using our key, we don’t need to do anything else, we just listen to incoming packets from our server and send a “ping” to our server every 40-50 seconds. All personal notifications (balance, notifications, etc.) will come automatically.
Available channels:
  • newitems_tf - information about changes in the price or putting up for sale items TF2. (Beware, the channel generates a lot of traffic)
  • history_tf - sales history that is displayed on each page of the site.
Attention! To be online and sell things, you need to send the ping command once a minute, once before sending a request to the API using the method PingPong.
Channels that do not require a subscription (subject to authorization):
  • additem_tf - adding an item on the "Sell items" page.
  • itemout_new_tf - Disappearing an item on the My Stuff page.
  • itemstatus_tf - Changing the status of an item on the "Sell items" page.
  • money - Changing the user`s balance.
  • webnotify - Receive notifications from the administration, the availability of an item for withdrawal, about purchases of things.

GetWSToken - Get websocket token

Request example:

https://tf2.tm/api/v2/get-ws-token?key=[your_secret_key]

get-ws-token

Using this request, you can obtain the token required to connect to the server.

IMPORTANT! The key is valid for a limited time and after 10 minutes is no longer accepted by the server.
Server to connect:

wss://wsprice.csgo.com/connection/websocket

Connection steps:
  1. We use Centrifugo as a server. You can find all the necessary SDK and instructions on how to work with it on the official Centrifugo website.
  2. You need to request a ws token via the API method described above.
  3. Establish a connection to the server and domain specified on the site.
  4. Subscribe to the desired channel.
Available channels:
  • public:items::rub - information about changes in price or items for sale for the game with id in currency RUB. (Be careful, the channel generates a lot of traffic!)
  • public:items::usd - information about changes in price or items for sale for the game with id in currency USD. (Be careful, the channel generates a lot of traffic!)
  • public:items::eur - information about changes in price or items for sale for the game with id in currency EUR. (Be careful, the channel generates a lot of traffic!)
What is "name_id"?:

To save traffic, we do not pass the hash name of the item, but instead give the name_id.

You can compare name_id and hash name from the file, which can be found at:

https://tf2.tm/api/v2/dictionary/names.json

Buying/selling items

trade-request-take

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

Request example:

https://tf2.tm/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://tf2.tm/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

Request example:

https://tf2.tm/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

Returns data for creating all trades

Request example:

https://tf2.tm/api/v2/trade-request-give-p2p-all?key=[your_secret_key]

Sample answer:
{
                          "success": true,
                          "offers" : [
                            {
                                "partner" : 12345,
                                "token" : "fffffff",
                                "tradeoffermessage" : "sdfsdf . . . 234234234/wefsdgsd",
                                "hash" : "234234234/wefsdgsd",
                                "items" : [
                                {
                                  "appid" : 730,
                                  "contextid" : 2,
                                  "assetid" : 23452345,
                                  "amount" : 1}
                                ]
                            },
                            {
                                "partner" : 123456,
                                "token" : "fffffff",
                                "hash" : "234234234/wefsdas",
                                "tradeoffermessage" : "sdfsdf . . . 234234234/wefsdas",
                                "items" : [
                                {
                                  "appid" : 730,
                                  "contextid" : 2,
                                  "assetid" : 23452346,
                                  "amount" : 1}
                                ]
                            }
                        ]}
                    
trade-ready

Register with us a trade offer that you created on Steam

Request example:

https://tf2.tm/api/v2/trade-ready?key=[your_secret_key]&tradeoffer=[steam_trade_offer_id]

Sample answer:

{
    "success": false,
    "tradeofferid": 1133557799,
    "error": "not active offers"
}
ping deprecated

Enable sales, you need to send every 3 minutes.

Request example:

https://tf2.tm/api/v2/ping?key=[your_secret_key]&v=2

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

Enable sales, you need to send every 3 minutes.

Request example:

[POST] https://tf2.tm/api/v2/ping-new?key=[your_secret_key]

Request parameters: (JSON)
{
                    "access_token": "eyAidHlwIjogIkpXVCIsICJhb.....",
                    "proxy": "http://proxy_login:proxy_pass@proxy_ip:proxy_port"
                }

The «proxy» parameter is optional. If it is passed, then requests with your «access_token» will be performed through the proxy.

Where can I get it?

The value of the access_token parameter can be obtained in several ways:

  1. The https://steamcommunity.com/pointssummary/ajaxgetasyncconfig method allows you to request an access token with the "web:community" scope. This scope allows you to use methods such as GetTradeOffer, GetTradeOffers and GetTradeHistory, and this token also allows you to cancel exchange offers.
  2. Mobile token obtained using libraries (for example, DoctorMcKay/node-steam-session) have the same level of access, but have a “web, mobile” scope

For https://*/pointssummary/ajaxgetasyncconfig requests the following format is used:

{
                        "success": 1,
                        "data": {
                            "webapi_token": "ACCESS_TOKEN"
                        }
                    }

This request necessarily requires the use of the "steamLoginSecure" cookie in the request headers, below is an example of a header:

Cookie: steamLoginSecure=COOKIE_PAYLOAD;
IMPORTANT! To use in services at the moment, you must use the access token from points 1 or 2.
IMPORTANT! The access_token is valid for 24 hours. You need to update it yourself and send it every time you call this method.
IMPORTANT! If you receive an «invalid_access_token» error and are absolutely sure that the token is valid, repeat the request.
Sample answer:
{
                    "success": true,
                    "ping": "pong",
                    "online": true,
                    "p2p": true,
                    "steamApiKey": true
                }
An example of a response in case of an error:
{
                        "success": false,
                        "message": "invalid_access_token"
                    }
go-offline

Stop selling items.

Request example:

https://tf2.tm/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://tf2.tm/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://tf2.tm/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 RUB = 100, 1 USD = 1000, 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://tf2.tm/api/v2/set-price?key=[your_secret_key]&item_id=[item_id]&price=[price]&cur=[currency]

Request parameters:
  • [item_id] — The ID of the item in our system, it can be obtained from the result of the request add-to-sale
  • [price] — amount, integer (1 RUB = 100, 1 USD = 1000, 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://tf2.tm/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://tf2.tm/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.

Request parameters:
  • [extended] — Extended information
Request example:

https://tf2.tm/api/v2/trades/?key=[your_secret_key]

https://tf2.tm/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://tf2.tm/api/v2/buy?key=[your_secret_key]&hash_name=[market_hash_name]&price=[price]

Request example:

https://tf2.tm/api/v2/buy?key=[your_secret_key]&id=[id]&price=[price]

Request parameters:
  • [market_hash_name] — market_hash_name item identifiers.
  • [id] — Item 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"
                    }
An example of a response in case of an error:
{
                        "success": false,
                        "error": "this custom_id exist"
                    }
Details of the answer:
  • id - Item ID
buy-for

Item purchase and it`s transfer to another user.

Request example:

https://tf2.tm/api/v2/buy-for?key=[your_secret_key]&hash_name=[market_hash_name]&price=[price]&partner=[partner]&token=[token]&chance_to_transfer=[chance]

Request example:

https://tf2.tm/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] — Item 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.
  • [chance] — Integer number from 0 to 100. Filter items when buying by seller with chance to transfer not lower than the specified number.
  • 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"
                    }
An example of a response in case of an error:
{
                        "success": false,
                        "error": "The recipient inventory is full",
                        "code": 21
                    }
Details of the answer:
  • id - Item ID
Possible errors:
  • 2 - An unknown error has occurred. Try again.
  • 3 - Failed to check the trade link
  • 5 - The recipient of the item has their inventory hidden
  • 6 - The user is banned in Steam
  • 7 - The recipient of the item has not bound a mobile authenticator
  • 8 - Error checking the link. Check the possibility of offline trades on your account
  • 12 - Invalid trade link
  • 20 - Our bot for checking trade links is banned
  • 21 - The recipient of the item inventory is full
get-buy-info-by-custom-id

Returns purchase status information

Request example:

https://tf2.tm/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": "USD",
        "for": "1234567",
        "trade_id": null
    }
}
Details of the answer:
  • trade_id - active trade_offer id
  • for - steamid(32) to whom the item was given (if the purchase was through the buy-for method)
  • time - Unix Timestamp when the item was purchased
  • paid - how much was the item purchased
  • 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://tf2.tm/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": "USD",
            "for": "1234567",
            "trade_id": null
        }
    }
}
Details of the answer:
  • trade_id - active trade_offer id
  • for - steamid(32) to whom the item was given (if the purchase was through the buy-for method)
  • paid - how much was the item purchased
  • time - Unix Timestamp when the item was purchased
  • 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://tf2.tm/api/v2/history?key=[your_secret_key]&date=12312314&date_end=12312714

Request example:

https://tf2.tm/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": "USD"
    }
  ]
}
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
operation-history

History of purchases, sales, deposit operations, withdrawals on all platforms

Request example:

https://tf2.tm/api/v2/operation-history?key=[your_secret_key]&date=1585042890&date_end=1592646090

Request parameters:
  • [date] - UNIX_TIMESTAMP
  • [date_end] - UNIX_TIMESTAMP
Sample answer:
{
  "success": true,
  "data": [
    {
      "time": "1592564265",
      "event": "sell",
      "item_id": "520336165",
      "market_hash_name": "Glock-18 | Ironwork (Factory New)",
      "class": "3706631132",
      "instance": "188530139",
      "price": "500",
      "received": "468",
      "currency": "USD",
      "stage": "5",
      "for": null,
      "custom_id": null,
      "app": 730
    },
    {
      "time": "1591817364",
      "event": "buy",
      "item_id": "286316972",
      "market_hash_name": null,
      "class": null,
      "instance": null,
      "paid": "193",
      "currency": "USD",
      "stage": "5",
      "for": null,
      "custom_id": null,
      "app": 570
    },
    {
      "time": "1588586061",
      "event": "checkout",
      "id": "542713332",
      "amount": "1001",
      "currency": "USD",
      "status": "105"
    }
  ]
}
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)
  • Event Checkout: status
    • 0 - The order has been created
    • 10 - The order is approved
    • 20 - The order has been sent for execution
    • 30 - The order is executed
    • 100 - The order is rejected
    • 105 - The order is canceled
    • 110 - Error
  • Event Byu/Sell: stage
    • TRADE_STAGE_NEW = 1
    • TRADE_STAGE_ITEM_GIVEN = 2
    • TRADE_STAGE_TIMED_OUT = 5

Buy orders

get-orders

Getting a list of your orders

Request example:

https://tf2.tm/api/v2/get-orders?key=[your_secret_key]&page=0

Request parameters:
  • page — The parameter is used for page output. By default, the request returns the last 100 orders.
Sample answer:
{
  "success": true,
  "orders": [
    {
      "hash_name": "Spectrum 2 Case",
      "phase": "",
      "count": 5,
      "date": "2021-09-08 18:06:58",
      "price": 10,
      "currency": "USD",
      "partner": null,
      "token": null
    }
  ]
}
set-order

Adding, modifying and deleting an order

Request example:

https://tf2.tm/api/v2/set-order?key=[your_secret_key]&market_hash_name=AWP | Dragon Lore (Field-Tested)&count=5&price=50000000[&partner=partnerID&token=tradeToken]

Request parameters:
  • market_hash_name — market_hash_name item identifiers.
  • phase — item phase. options: phase1, phase2, phase3, phase4, sapphire, ruby, blackpearl
  • count — Number of items to buy
  • price — price in kopecks (1 RUB = 100, 1 USD = 1000, 1 EUR = 1000) integer
  • [partner] — Steam ID of the user to whom the purchased item will be transferred (optional)
  • [token] — The token from the exchange link of the user to whom the item will be given (optional)
Sample answer:
{
  "success": true,
  "order": {
    "hash_name": "AWP | Dragon Lore (Field-Tested)",
    "phase": "",
    "currency": "USD",
    "price": 20,
    "count": 5,
    "date": "2021-09-08 18:30:44",
    "partner": null,
    "token": null
  }
}
get-orders-log

History of executed orders

Request example:

https://tf2.tm/api/v2/get-orders-log?key=[your_secret_key]&page=0

Request parameters:
  • page — The parameter is used for page output. By default, the request returns the last 100 orders.
Sample answer:
{
  "success": true,
  "orders": [
    {
      "hash_name": "Desert Eagle | Oxide Blaze (Field-Tested)",
      "item_id": 520336218,
      "created": "2021-09-06 18:00:27",
      "executed": "2021-09-06 18:03:16",
      "price": 1000,
      "currency": "USD"
    },
    {
      "hash_name": "Gamma 2 Case",
      "item_id": 520336215,
      "created": "2021-09-06 17:59:54",
      "executed": "2021-09-06 17:59:54",
      "price": 5000,
      "currency": "USD"
    }
  ]
}

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://tf2.tm/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.45, "currency": "USD", "success": true}
Sample answer for EUR:
{"money": 123.45, "currency": "EUR", "success": true}
go-offline

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

Request example:

https://tf2.tm/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://tf2.tm/api/v2/update-inventory/?key=[your_secret_key]

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

Transferring discounts to another account

Request example:

https://tf2.tm/api/v2/transfer-discounts?key=[your_secret_key]&to=[his_secret_key]

Request parameters:
  • [his_secret_key] - API key of the account to which the discounts are transferred.
Sample answer:
{"success":true}
get-my-steam-id

Find out your steamID

Request example:

https://tf2.tm/api/v2/get-my-steam-id?key=[your_secret_key]

Sample answer:
{
    "success": true,
    "steamid32": 123456,
    "steamid64": "1234123513245234"
}
set-pay-password

Setting/changing payment password.

Possible either in the first 24 hours after registration, or at any time, but with the specified and confirmed mailing address.

Request example:

https://tf2.tm/api/v2/set-pay-password?old_password=[old_password]&new_password=[new_password]&key=[your_secret_key]

Request parameters:
  • [old_password] - Old billing password (not specified if the billing password is being set up for the first time)
  • [new_password] - New payment password
Sample answer:
{
    "success": true
}
money-send

Transferring the balance from the current account to the specified one

Possible only if the payment password has been set

Transfer from account to account with different currencies is made at the exchange rate for the current day

Request example:

https://tf2.tm/api/v2/money-send/[amount]/[user_api_key]?pay_pass=[pay_pass]&key=[your_secret_key]

Request parameters:
  • [amount] - amount, integer (1 RUB = 100, 1 USD = 1000, 1 EUR = 1000)
  • [user_api_key] - The api key of the account to which the balance will be transferred.
  • [pay_pass] - Current payment password.
Sample answer:
{
    "success": true,
    "from": 1234567,
    "to": 13579123,
    "amount": 1000
}
money-send-history

History of balance transfers from the current account

Request example:

https://tf2.tm/api/v2/money-send-history/[page = 0]?key=[your_secret_key]

Request parameters:
  • [page] - Optional parameter. The default is 0.
Sample answer:
{
  "success": true,
  "data": [
    {
      "id": "6308681",
      "from": "12345678",
      "to": "11223344",
      "amount_from": "10000",
      "currency_from": "USD",
      "amount_to": "10000",
      "currency_to": "USD"
    }
}
set-steam-api-keydeprecated

Linking the Steam API key to your account

Request example:

https://tf2.tm/api/v2/set-steam-api-key?key=[your_secret_key]&steam-api-key=[steam-api-key]

Request parameters:
  • [steam-api-key] - Your Steam API key.
Sample answer:
{
    "success": true
}
set-trade-token

Linking a trade link to an account

Request example:

https://tf2.tm/api/v2/set-trade-token?key=[your_secret_key]&token=[token]

Request parameters:
  • [token] - Your token from the trade link
Sample answer:
{
    "success": true,
    "token": "kf47d09"
}
change-currency

Account currency change

IMPORTANT! Currency change is possible for accounts with zero balance. Also, there should not be active items for receiving/transferring and active requests for withdrawal.
Request example:

https://tf2.tm/api/v2/change-currency/[new-currency]?key=[your_secret_key]

Request parameters:
  • [new-currency] - The new currency to be set for the account. Available: RUB, USD, EUR.
Sample answer:
{
    "success": true
}
An example of a response in case of an error:
{
    "success": false,
    "error": 1001
}
Коды ошибок:
  • 1001: You can not change the currency until you put up products for sale. Wait for them to buy, or remove from sale. To remove all items from the sale CLICK HERE and try again.
  • 1003: You can not change currency as long as you have active requests for withdrawal. Wait until they are executed, or cancel them manually.
  • 1004: You have already chosen this currency
  • 1005: Invalid currency selected
  • 1007: Error. You tried to send a request for a change of currency two or more times. If the conversion has not yet completed, please wait a bit and refresh the page.
get-api-key-via-access-token

Registration of an account on the market and obtaining an API key

You can automate the registration of your Steam accounts on our market. For this, you need to pass the access_token (see the ping-new method) and proxy. We will register the account if it has not been registered yet, save the trade link and generate the platform API key.

IMPORTANT! Proxy - a required parameter, because we are accessing Steam servers for validation and trade link retrieval.
Request example:

[POST] https://tf2.tm/api/v2/get-api-key-via-access-token?key=[your_secret_key]

Request parameters: (JSON)
{
                    "access_token": "eyAidHlwIjogIkpXVCIsICJhb.....",
                    "proxy": "http://proxy_login:proxy_pass@proxy_ip:proxy_port",
                    "currency": "USD"
                }

The «currency» parameter is optional. If it is passed, then when creating an account, it will be used the selected currency. By default: RUB.

Sample answer:
{
                    "success": true,
                    "apikey": "abcdefghijklmnopqrstubvwxyz",
                    "is_new": true
                }
An example of a response in case of an error:
{
                        "success": false,
                        "message": "invalid_proxy"
                    }

Search for items

search-item-by-hash-name

Option to request a single item

Request example:

https://tf2.tm/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" : "USD",
                        "data": [
                            {
                                "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://tf2.tm/api/v2/search-item-by-hash-name-specific?key=[your_secret_key]&hash_name=[market_hash_name]&phase=[phase]

Request parameters:
  • [market_hash_name] - Item name, it can be taken from the Steam inventory.
  • [phase] - item phase. options: phase1, phase2, phase3, phase4, sapphire, ruby, blackpearl
Sample answer:
{
    "success": true,
    "currency": "USD",
    "data": [
        {
            "id": 521320033,
            "market_hash_name": "AWP | Worm God (Factory New)",
            "price": 3573,
            "class": 3088304936,
            "instance": 480085569,
            "seller_steam_level": 2,
            "extra": {
                "float": "0.061443410813808",
                "phase": "aq_awp_twine"
            }
        },
        {
            "id": 523494595,
            "market_hash_name": "AWP | Worm God (Factory New)",
            "price": 3604,
            "class": 1848971742,
            "instance": 480085569,
            "seller_steam_level": null,
            "extra": {
                "float": "0.051711451262236",
                "phase": "aq_awp_twine"
            }
        },
        {
            "id": 522446815,
            "market_hash_name": "AWP | Worm God (Factory New)",
            "price": 4386,
            "class": 3033846573,
            "instance": 188530139,
            "seller_steam_level": 12,
            "extra": {
                "float": "0.038657382130623",
                "phase": "aq_awp_twine"
            }
        },
        {
            "id": 521834932,
            "market_hash_name": "AWP | Worm God (Factory New)",
            "price": 4386,
            "class": 3099667914,
            "instance": 188530139,
            "seller_steam_level": 32,
            "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

Option to query by list of items. Returns a limited number of offers from the market_hash_name list.

If the extended=1 parameter is specified in the url, then the maximum market_hash_name quantity limit is 5. For each item, you will receive the first 500 positions for sale.

If the extended=1 parameter is NOT specified, then the maximum market_hash_name quantity limit is 50, and for each item you will receive the first 50 positions for sale.

Example of a request without the extended parameter:

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

Example of a request with the extended parameter:

https://market.csgo.com/api/v2/search-list-items-by-hash-name-all?key=[your_secret_key]&extended=1&list_hash_name[]=[market_hash_name]&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": "USD",
      "data": {
        "USP-S | Lead Conduit (Well-Worn)": [
            {
              "id": 535992148,
              "price": "5100",
              "class": 3017010398,
              "instance": 188530139,
              "seller_steam_level": 4,
              "extra": {
                "asset": "35081291",
                "float": "0.39269635081291",
                "phase": "gs_usp_voltage",
                "percent_success": "100.00",
                "average_time": "195"
              }
            }
        ],
        "USP-S | Lead Conduit (Factory New)": [
            {
              "id": 545992413,
              "price": "10100",
              "class": 3017020387,
              "instance": 188530171,
              "seller_steam_level": 7,
              "extra": {
                "asset": "320811187",
                "float": "0.04768768698012",
                "phase": "gs_usp_voltage",
                "percent_success": "88.00",
                "average_time": "163"
              }
            }
        ]
      }
}
Explanation of the answer (a block of information about a specific offer of one of the items):
  • id — The unique id of the item by which it can be bought.
  • extra — Block with additional information about the subject.
  • percent_success — Percentage of successful seller transactions.
  • average_time — The average time it takes a seller to hand over an item.
get-list-items-info

Option to request a list of items

Request example:

https://tf2.tm/api/v2/get-list-items-info?key=[your_secret_key]&list_hash_name[]=[market_hash_name]&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": "USD",
    "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
bid-ask

Request the stock by hash

Request example:

https://tf2.tm/api/v2/bid-ask?key=[your_secret_key]&hash_name=[market_hash_name]&phase=[phase]

Request parameters:
  • [market_hash_name] - Item name, it can be taken from the Steam inventory.
  • [phase] - item phase. options: phase1, phase2, phase3, phase4, sapphire, ruby, blackpearl
Sample answer:
{
	"bid": [
		{
			"price": "414.0600",
			"total": "1"
		},
		{
			"price": "406.4600",
			"total": "3"
		}
    ],
    "ask": [
		{
			"price": "441.5900",
			"total": "1"
		},
		{
			"price": "441.7800",
			"total": "1"
		}
    ],
    "currency": "USD"
}
Details of the answer:
  • bid — buy orders
  • ask — items on sale (offers)
  • currency — current currency

Deposits and withdrawals

checkout-history

Getting the history of withdrawal operations (100 per page)

Request example:

https://tf2.tm/api/v2/checkout-history?key=[your_secret_key][&page=0]

Request parameters:
  • [page] - Optional parameter. The default is 0. The page is in search results.
Sample answer:
{"success":true,
    "data":[
        {
            "id":"9503323",
            "uid":"1234567890",
            "summ":"10000",
            "paid":"9500",
            "method":"card",
            "wm":"7-9683912365",
            "status":"30",
            "comment":"",
            "created":"2021-05-26 19:10:45",
            "currency":"USD",
            "can_cancel":false
        }
    ]
}
Details of the answer:
  • summ, paid — amount, integer (1 RUB = 100, 1 USD = 1000, 1 EUR = 1000)
  • status — The order status

    = 0 - The order has been created

    = 10 - The order is approved

    = 20 - The order has been sent for execution

    = 30 - The order is executed

    = 100 - The order is rejected

    = 105 - The order is canceled

    = 110 - Error

checkin-history

Getting the history of replenishment transactions (100 per page)

Request example:

https://tf2.tm/api/v2/checkin-history?key=[your_secret_key][&page=0]

Request parameters:
  • [page] - Optional parameter. The default is 0. The page is in search results.
Sample answer:
{"success":true,
    "data":[
        {
            "id":"34754143",
            "uid":"1234567890",
            "system":"paygate",
            "amount":"15000",
            "created":"2021-09-13 07:15:36",
            "currency":"USD"
        },
        {
            "id":"34754142",
            "uid":"1234567890",
            "system":"paygate",
            "amount":"10000",
            "created":"2021-09-04 15:12:29",
            "currency":"USD"
        }
    ]
}
Details of the answer:
  • amount — amount, integer (1 RUB = 100, 1 USD = 1000, 1 EUR = 1000)

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://tf2.tm/api/v2/test?key=[your_secret_key]

Sample answer:
{

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

        }
Details of the answer:
  • user_token — Is there a trade link set
  • trade_check — Has trade availability check been completed? - https://tf2.tm/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)
  • steam_web_api_key — Steam API key installed (needed for selling via p2p)

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

04.03.2022

Added method change-currency.

04.03.2022

Added method set-trade-token.

24.03.2022

Added method operation-history.

24.03.2022
03.04.2024

Added method trade-ready.

16.07.2024
15.08.2024

Added method stickers.

03.10.2024

Added method bid-ask.

03.12.2024

Method updated buy, buy-for.