API TM ENG - danrom11/API_TM GitHub Wiki

Content

All items in the market:

  1. NameDB
  2. DownloadDB

Public APIs without authorization:

  1. History

Item information:

  1. ItemInfo
  2. ItemHistory
  3. GetFloatHash
  4. SellOffers
  5. BestSellOffer
  6. BuyOffers
  7. BestBuyOffer
  8. GetBaseName
  9. GetItemDescription

Selling items:

  1. SetPrice
  2. RemoveAll
  3. ItemRequest
  4. ReportCreatedTrade
  5. ReportFailedTrade
  6. MarketTrades
  7. MassSetPrice

Buying items:

  1. Buy

Orders:

  1. GetOrders
  2. InsertOrder
  3. UpdateOrder
  4. ProcessOrder
  5. DeleteOrders
  6. StatusOrders
  7. GetOrdersLog

Notifications:

  1. GetNotifications
  2. UpdateNotification

Account Actions:

  1. Trades
  2. GetMoney
  3. PingPong
  4. GoOffline
  5. SetSteamAPIKey
  6. SetToken
  7. GetToken
  8. GetWSAuth
  9. UpdateInventory
  10. InventoryItems
  11. OperationHistory
  12. GetDiscounts
  13. GetCounters
  14. GetMyProfileHash
  15. GetProfileItems
  16. GetMySellOffers
  17. GetItemsToGive

Search for items:

  1. SearchItemByName

Instant purchases (purchase without waiting for the transfer of the item)

  1. QuickItems
  2. QuickBuy

Additionally:

  1. GetStickers
  2. Test
  3. GetChatLog
  4. CheckBotStatus

NameDB()

Information about items on the main page of the site is based on the offers of sellers who are currently online on the site. It is stored in a special database and updated once a minute. Thus, it makes no sense to scan the main page or search for items more often than once a minute and creates an excessive load on our server. A database of all items on sale is available for download in a single file.

Usage example

using API_TM;
 
string name = API_CSGO.NameDB();

DownloadDB(string directory, string namedb)

A database of items on sale at a fixed point in time.
"csv" format delimiter ";", utf-8 encoding. Not updated.
Downloaded by WebClient.

Parametrs

string directory - Download directory
string namedb - The name of the database file, csv format.

Usage example

using API_TM;
 
string dir = "db";
string nameBase = items_730_1610153311.csv;

API_CSGO.DownloadDB(@dir, nameBase);

History()

A list of the last 50 purchases from the entire marketplace.

Usage example

using API_TM;
 
string history = API_CSGO.History();

ItemInfo(string classid, string instanceid, string language, string yoursecretkey)

Information and offers about the sale of a particular item.

Parametrs

string classid - The classid of the item in Steam can be found in the link to the item.
string instanceid - InstanceID of the item in Steam, can be found in the link to the item.
string language - In what language to get a description of the subject, possible values of ru or en.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;
string id = "384801319";
string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string item = API_CSGO.ItemInfo(id, "0", "RU", key);

ItemHistory(string classid, string instanceid, string yoursecretkey)

Information about prices and the last 500 purchases of a particular item.

Parametrs

string classid - The classid of the item in Steam can be found in the link to the item.
string instanceid - InstanceID of the item in Steam, can be found in the link to the item.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string id = "384801319";
string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string itemHistory = API_CSGO.ItemInfo(id, "0", key);

GetFloatHash(string classid, string instanceid, string yoursecretkey)

Get a hash of an item for a Float Value request (wear) from a special server.

Parametrs

string classid - The classid of the item in Steam can be found in the link to the item.
string instanceid - InstanceID of the item in Steam, can be found in the link to the item.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string id = "384801319";
string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string floaths = API_CSGO.GetFloatHash(id, "0", key);

SellOffers(string classid, string instanceid, string yoursecretkey)

Receive offers for the sale of a specific item.

Parametrs

string classid - The classid of the item in Steam can be found in the link to the item.
string instanceid - InstanceID of the item in Steam, can be found in the link to the item.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string id = "384801319";
string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string sellOffers = API_CSGO.SellOffers(id, "0", key);

BestSellOffer(string classid, string instanceid, string yoursecretkey)

Receive offers for the sale of a specific item.

Parametrs

string classid - The classid of the item in Steam can be found in the link to the item.
string instanceid - InstanceID of the item in Steam, can be found in the link to the item.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string id = "384801319";
string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string bestSellOffers = API_CSGO.BestSellOffer(id, "0", key);

BuyOffers(string classid, string instanceid, string yoursecretkey)

Get a list of offers (orders) for the sale of an item. An item billed for this price will be instantly sold.

Parametrs

string classid - The classid of the item in Steam can be found in the link to the item.
string instanceid - InstanceID of the item in Steam, can be found in the link to the item.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string id = "384801319";
string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string buyOffers = API_CSGO.BuyOffers(id, "0", key);

BestBuyOffer(string classid, string instanceid, string yoursecretkey)

Get the highest bid (orders) for the sale of the subject. An item billed for this price will be instantly sold.

Parametrs

string classid - The classid of the item in Steam can be found in the link to the item.
string instanceid - InstanceID of the item in Steam, can be found in the link to the item.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string id = "384801319";
string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string bestBuyOffers = API_CSGO.BestBuyOffer(id, "0", key);

GetBaseName(string markethashname, string yoursecretkey)

Get the base name of an item. Base name is the name of the item without the wear, rarity, or StatTrack modifiers.

Parametrs

string markethashname - Market_hash_name of the item on Steam.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string mHash = "Tour%20of%20Duty%20Ticket";
string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string baseName= API_CSGO.GetBaseName(mHash, key);

GetItemDescription(string classid, string instanceid, string yoursecretkey)

Get only the item description and hash for the Buy method.

Parametrs

string classid - The classid of the item in Steam can be found in the link to the item.
string instanceid - InstanceID of the item in Steam, can be found in the link to the item.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string id = "384801319";
string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string itemDescriprion = API_CSGO.GetItemDescription(id, "0", key);

SetPrice(string classid, string instanceid, string yoursecretkey)

List a new item for sale. To get a list of items to display, use the GetInv method.

Parametrs

string classid - The classid of the item in Steam can be found in the link to the item.
string instanceid - InstanceID of the item in Steam, can be found in the link to the item.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string id = "384801319";
string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string price = API_CSGO.SetPrice(id, "0", key);

RemoveAll(string yoursecretkey)

Removal of all items from sale at once.

Parametrs

string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string result = API_CSGO.RemoveAll(key);

ItemRequest(string botid, string yoursecretkey)

With this method, you can request the transfer of an item that was purchased from you or purchased by you. You will be sent an offline tradeoffer on Steam, which must be accepted within 2 minutes. A maximum of 20 items can be involved in one operation.

Parametrs

string botid - The bot identifier, which can be found using the Trades method, is the ui_bid field for items with the status (ui_status) = 4.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";
string botID = "354589802";

string result = API_CSGO.ItemRequest(botID, key);

ReportCreatedTrade(string requestId, string tradeOfferId, string yoursecretkey)

System notification about successful trade creation.

Parametrs

string requestId - Offer ID received in ItemRequest.
string tradeOfferId - ID of the trade offer created on Steam.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";
string reqId= "354589802";
string treadeOfId= "423123";

string result = API_CSGO.ReportCreatedTrade(reqId, treadeOfId, key);

ReportFailedTrade(string requestId, string yoursecretkey)

Calling this method is necessary if creating a trade is impossible due to the lack of required items. In this case, the system will re-create the item list the next time ItemRequest is called.

Parametrs

string requestId - Offer ID received in ItemRequest.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";
string reqId= "354589802";

string result = API_CSGO.ReportFailedTrade(reqId, key);

MarketTrades(string yoursecretkey)

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

Parametrs

string yoursecretkey - Your API key on the market.

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string result = API_CSGO.MarketTrades(key);

MassSetPrice(string name, string price, string yoursecretkey)

Change the price at once for many items on sale by item name.

Parametrs

string name - OR Item Name (This can be market_hash_name, market_name in English or Russian) OR the classid_instanceid of the item
string price - Price in kopecks (minimum 50).
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";
string name= "lol";
string price = "8000"

string result = API_CSGO.MassSetPrice(name, price, key);

Buy(string classid, string instanceid, string price, string hash, string partner, string token, string yoursecretkey)

Purchase of an item. In our system, you can only buy one item per request.

Parametrs

string classid - Ids of the item that can be found in the link to the item. https://market.dota2.net/item/57939770-57939888-Treasure+Key/ - key in Dota2. 57939770 - [classid], 57939888 - [instanceid].
string instanceid - Ids of the item that can be found in the link to the item. https://market.dota2.net/item/57939770-57939888-Treasure+Key/ - key in Dota2. 57939770 - [classid], 57939888 - [instanceid].
string price - The price in kopecks (an integer number) of a given lot, or you can specify any amount greater than the price of the cheapest lot, in the second case the item will be bought at the lowest price.
string hash - md5 from the item description. You can find it in the ItemInfo method answer. This was introduced so that you can be sure of buying exactly the thing you are buying. If this is not interesting for you, just send an empty string - that is, make a request like ... [price] //? Key = ...
string partner - Parameters of the trade link of the account that will receive the item. Only need to be specified if you want the item to be transferred directly not to you, but to another Steam user. This parameter works only in CS: GO and Dota2.
string token - Parameters of the trade link of the account that will receive the item. Only need to be specified if you want the item to be transferred directly not to you, but to another Steam user. This parameter works only in CS: GO and Dota2.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";
string classid= "43212321";
string instanceid = "86549";
string hash = "d131dd02c5e6eec4693d9a0698aff95c";
string partner= "654756756754675463454353";
string token = "2392";
string price = "8000"

string result = API_CSGO.Buy(classid, instanceid, price, hash, partner, token, key);

GetOrders(string page, string ext, string yoursecretkey)

Get a list of your orders, current at the moment. On the website: https://market.csgo.com/orders/

Parametrs

string page - Page number, there are 500 items on the page. An optional parameter, if it is not specified in the response, you will receive only 2000 of your applications.
string ext - It can be 1 or 0, or it can be absent. If the value 1 is passed, then information about who the item will be transferred to is additionally displayed (see the InsertOrder method, the partner and token parameters).
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";
string page = "321";
string ext = "1"

string result = API_CSGO.GetOrders(page, ext, key);

InsertOrder(string classid, string instanceid, string price, string hash, string partner, string token, string yoursecretkey)

Create a new request to automatically purchase an item.

Parametrs

string classid - The ClassID of the item on Steam, can be found in the item link.
string instanceid - The InstanceID of the item on Steam, can be found in the item link.
string price - Price in kopecks, integer.
string hash - If you want to be sure that you are buying (see the Buy method), it is optional - you can send an empty string "[price] //? Key = ...
string partner - Steam user ID to whom the purchased item will be transferred.
string token - Token from the link for the exchange of the user to whom the item will be transferred.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";
string classid= "43212321";
string instanceid = "86549";
string hash = "d131dd02c5e6eec4693d9a0698aff95c";
string partner= "654756756754675463454353";
string token = "2392";
string price = "8000"

string result = API_CSGO.InsertOrder(classid, instanceid, price, hash, partner, token, key);

UpdateOrder(string classid, string instanceid, string price, string partner, string token, string yoursecretkey)

Modify / remove a request to automatically purchase an item.

Parametrs

string classid - The ClassID of the item on Steam, can be found in the item link.
string instanceid - The InstanceID of the item on Steam, can be found in the item link.
string price - Price in kopecks, integer.
string hash - If you want to be sure that you are buying (see the Buy method), it is optional - you can send an empty string "[price] //? Key = ...
string partner - Steam user ID to whom the purchased item will be transferred.
string token - Token from the link for the exchange of the user to whom the item will be transferred.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";
string classid= "43212321";
string instanceid = "86549";
string partner= "654756756754675463454353";
string token = "2392";
string price = "8000"

string result = API_CSGO.UpdateOrder(classid, instanceid, price, partner, token, key);

ProcessOrder(string classid, string instanceid, string price, string partner, string token, string yoursecretkey)

Using this method, you can create, update, and delete an auto-purchase request for an item.
If the request is absent, it will be created, if present, it will be updated.When the price is updated to 0, the order will be deleted.

Parametrs

string classid - The ClassID of the item on Steam, can be found in the item link.
string instanceid - The InstanceID of the item on Steam, can be found in the item link.
string price - Price in kopecks, integer.
string hash - If you want to be sure that you are buying (see the Buy method), it is optional - you can send an empty string "[price] //? Key = ...
string partner - Steam user ID to whom the purchased item will be transferred.
string token - Token from the link for the exchange of the user to whom the item will be transferred.
string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";
string classid= "43212321";
string instanceid = "86549";
string partner= "654756756754675463454353";
string token = "2392";
string price = "8000"

string result = API_CSGO.ProcessOrder(classid, instanceid, price, partner, token, key);

DeleteOrders(string yoursecretkey)

Delete all requests for automatic purchase of an item at once.

Parametrs

string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string result = API_CSGO.DeleteOrders(key);

StatusOrders(string yoursecretkey)

Find out the status of orders.

Parametrs

string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string result = API_CSGO.StatusOrders(key);

GetOrdersLog(string yoursecretkey)

This method helps to find out the history of triggering automatic buy orders. The last 100 orders are displayed.

Parametrs

string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string result = API_CSGO.GetOrdersLog(key);

GetNotifications(string yoursecretkey)

Get a list of included price change notifications. On the website: https://market.csgo.com/mail/

Parametrs

string yoursecretkey - Your API key on the market.

Usage example

using API_TM;

string key = "Bpm2zO14H8YESg6I956g5SS3tf3AJ9O";

string result = API_CSGO.GetNotifications(key);
⚠️ **GitHub.com Fallback** ⚠️