Buying/selling items
Put an item for sale
- [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.
{ "success":true, "item_id":136285662 }
{ "success":false, "error":"bad_request" }
- 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 a new price on the item, or remove from sale.
- [item_id] — Sistemimizdeki öğenin ID`si, istek sonucunda elde edilebilir. 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.
{ "success": true }
{ "success":false, "error":"bad_item" }
- bad_item - item with this ID is not found
Removing all items at once from the sale.
{ "count":4, "success":true }
- count — The number of items that were removed from sale, 0 if there are no items for sale
Getting Steam inventory, only those items that you have not yet put up for sale.
https://market.csgo.com/api/v2/my-inventory?key=[your_secret_key]
{ "success": true, "items": [ { "id": "14933635912", "classid": "310776767", "instanceid": "0", "market_hash_name": "SCAR-20 | Carbon Fiber (Factory New)", "market_price": 10.34, "tradable": 1 } ] }
- id — ID (assetid) for sale (see method add-to-sale)
- market_price — recommended sale price
List of items:
{ "success": true, "items": [ { "item_id": "286316844", "assetid": "15092687536", "classid": "637317999", "instanceid": "630912635", "real_instance": "1629337655", "market_hash_name": "Horns of Monstrous Reprisal", "position": 0, "price": 4, "currency": "USD", "status": "1", "live_time": 920, "left": null, "botid": "0" } ] }
- status = 1 — 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.
- 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
Enable sales, you need to send every 3 minutes.
{ "success": true, "ping": "pong", "online": true, "p2p": true, "steamApiKey": true }
{ "success": false, "message": "too early for pong" }
Enable sales, you need to send every 3 minutes.
[POST] https://market.csgo.com/api/v2/ping-new?key=[your_secret_key]
{ "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.
- 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.
- 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;
The access_token is valid for 24 hours. You need to update it yourself and send it every time you call this method.
If you receive an «invalid_access_token» error and are absolutely sure that the token is valid, repeat the request.
{ "success": true, "ping": "pong", "online": true, "p2p": true, "steamApiKey": true }
{ "success": false, "message": "invalid_access_token" }
Create a request for the transfer of purchased items that are at our bots.
https://market.csgo.com/api/v2/trade-request-take?key=[your_secret_key][&bot=botid]
- botid — The ID of our bot from which you want to pick up items is optional.
{ "success": true, "trade": "1704976549", "nick": "NIPFribergEZIO", "botid": "354589802", "profile": "https://steamcommunity.com/profiles/76561198314855530/", "secret": "1J10", "items": [ "1812819920_188530170", "2082539396_188530139", "2048839018_902658099" ] }
- 3001 — nothing to transfer.
Create a request to transfer purchased items to our bot
{ "success": true, "trade": "1704976549", "nick": "NIPFribergEZIO", "botid": "354589802", "profile": "https://steamcommunity.com/profiles/76561198314855530/", "secret": "1J10", "items": [ 15060788266 ] }
Request data to transfer the item to the buyer
{ "success": true, "hash" : "234234234/wefsdgsd", "offer" : { "partner" : 12345, "token" : "fffffff", "tradeoffermessage" : "sdfsdf . . . 234234234/wefsdgsd", "items" : [ { "appid" : 730, "contextid" : 2, "assetid" : 23452345, "amount" : 1 } ] } }
Returns data for creating all trades
{ "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 } ] } ] }
Register with us a trade offer that you created on Steam
https://market.csgo.com/api/v2/trade-ready?key=[your_secret_key]&tradeoffer=[steam_trade_offer_id]
{ "success": false, "tradeofferid": 1133557799, "error": "not active offers" }
Get a list of trade offers that are currently sent to your account by the Market and are awaiting confirmation on Steam.
- extended — Extended information
{ "success": true, "trades": [ { "dir": "out", "trade_id": "3759667687", "bot_id": "1022850783", "timestamp": 1572021797, "secret": "3R5U", "nik": "teresiacais", "list_item_id": { "361847026": { "id": "361847026", "assetid": "17737368051", "classid": "284952881", "instanceid": "1625510296" }, "361851594": { "id": "361851594", "assetid": "17737368059", "classid": "284952881", "instanceid": "1625510296" } } }, { "dir": "in", "trade_id": "3759668212", "bot_id": "1022850783", "timestamp": 1572021825, "secret": "EC58", "nik": "teresiacais", "list_item_id": { "381304045": { "id": "381304045", "assetid": "8028182393", "classid": "996701649", "instanceid": "0" } } } ] }
- dir — 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
Item purchase. In our system, it is possible to purchase only one item per request.
https://market.csgo.com/api/v2/buy?key=[your_secret_key]&hash_name=[market_hash_name]&price=[price]
https://market.csgo.com/api/v2/buy?key=[your_secret_key]&id=[id]&price=[price]
- [market_hash_name] — market_hash_name 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!)
{ "success":true, "id":"136256960" }
{ "success":false, "error":"this custom_id exist" }
- id - Item ID
Bir öğeyi satın alıp başka bir kullanıcıya devretmek.
- [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!)
{ "success":true, "id":"136256960" }
{ "success":false, "error":"this custom_id exist" }
- id - Item ID
Returns purchase status information
https://market.csgo.com/api/v2/get-buy-info-by-custom-id?key=[your_secret_key]&custom_id=[custom_id]
- [custom_id] — custom_id is your unique ID set in the method (buy, buy-for)
{ "success": true, "data": { "item_id": "534415936", "market_hash_name": "Spectrum 2 Case", "classid": "2521767801", "instance": "0", "time": "1548081954", "send_until" : null, "stage": "2", "paid": 0.5, "causer": null, "currency": "USD", "for": "1234567", "trade_id": null } }
- 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
Returns purchase status information
- custom_id[] — custom_id is your unique ID set in the method (buy, buy-for)
{ "success": true, "data": { "custom_id": { "item_id": "534415936", "market_hash_name": "Spectrum 2 Case", "classid": "2521767801", "instance": "0", "time": "1548081954", "send_until" : null, "stage": "2", "paid": 0.5, "currency": "USD", "for": "1234567", "trade_id": null } } }
- 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
https://market.csgo.com/api/v2/history?key=[your_secret_key]&date=12312314&date_end=12312714
https://market.csgo.com/api/v2/history?key=[your_secret_key]&date=[DD-MM-YYYY]
- [date] - the date in the DD-MM-YYYY format, for example (10-08-1986). или UNIX_TIMESTAMP
- [date_end] - UNIX_TIMESTAMP
{ "success": true, "data": [ { "item_id": "286316842", "market_hash_name": "Maraxiform's Ire", "class": "2274724615", "instance": "57949762", "time": "1546229560", "event": "buy", "app": 570, "stage": "2", "for": null, "custom_id": null, "paid": "72", "currency": "USD" } ] }
- 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
History of purchases, sales, deposit operations, withdrawals on all platforms
- [date] - UNIX_TIMESTAMP
- [date_end] - UNIX_TIMESTAMP
{ "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" } ] }
- 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
Option to request a single item
- [market_hash_name] - Item name, it can be taken from the Steam inventory.
{ "success": true, "currency": "USD", "data": { "USP-S | Lead Conduit (Well-Worn)": { "max": 3.8, "min": 1.24, "average": 50, "history": [ [1695397484, 2.1], [1692708282, 1.5] ] } } }
- max — max price
- min — min price
- history — sales history
Request the stock by hash
- [market_hash_name] - Item name, it can be taken from the Steam inventory.
- [phase] - item phase. options: phase1, phase2, phase3, phase4, sapphire, ruby, blackpearl
{ "bid": [ { "price": "414.0600", "total": "1" }, { "price": "406.4600", "total": "3" } ], "ask": [ { "price": "441.5900", "total": "1" }, { "price": "441.7800", "total": "1" } ], "currency": "USD" }
- bid — buy orders
- ask — items on sale (offers)
- currency — current currency
Check all possible obstacles to the successful items selling.
{ "success": true, "status": { "user_token": true, "trade_check": true, "site_online": false, "site_notmpban": false, "steam_web_api_key" : false } }
- user_token — Is there a trade link set
- trade_check — Has trade availability check been completed?
- 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)