Jump to content
McKay Development

Recommended Posts

Posted

Can I sell my items using method httpRequest to /sellitem with options? I tried but always failed, I know that automating market listings is against Steam ToS, but how it knows that my requests are automated?

Posted (edited)

I send item's data in options.form and headers in options.headers, is it not
right?

options: {
  headers: {
   'User-Agent': 'request',
    ....
  }
  form: itemData
}
Edited by darkwar123
Posted

If somebody would be useful options need to look like this:

var options = {
        url: 'https://steamcommunity.com/market/sellitem/',
        headers: {
            'Origin': 'http://steamcommunity.com',
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36',
            'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
            'Referer': 'http://steamcommunity.com/my/inventory/',
            'Accept-Encoding': 'gzip, deflate',
            'Accept-Language': 'ru,en-US;q=0.8,en;q=0.6,en-AU;q=0.4'
        },
        form: {
            sessionid: this.sessionid,
            appid: item.appid,
            contextid: item.contextid,
            assetid: item.assetid,
            amount: 1,
            price: item.price
        }
    };
  • 3 weeks later...
Posted

Hi, thanks for sharing. I have problem with this - always get status code 400.

 

	var options = {
		url: 'https://steamcommunity.com/market/sellitem/',
		headers: {
			'Origin': 'http://steamcommunity.com',
			'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36',
			'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
			'Referer': 'http://steamcommunity.com/my/inventory/',
			'Accept-Encoding': 'gzip, deflate',
			'Accept-Language': 'ru,en-US;q=0.8,en;q=0.6,en-AU;q=0.4'
		},
		form: {
			sessionid: session,
			appid: items[index]["appid"],
			contextid: items[index]["contextid"],
			assetid: items[index]["assetid"],
			amount: 1,
			price: 3 // price is $0.03
		}
	};

	request(options, function (error, response, body) {
		if(!error && response.statusCode == 200){
			console.log("Item added on market ($" + price + ") > " + items[index]["market_hash_name"]);
		}else{
			console.log("Error item > " + items[index]["market_hash_name"]);
			console.log(error);
			console.log(body);
			console.log(response);
			console.log(response.statusCode);
		}
	});
Where is the problem?

Thanks for everything :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...