Jump to content
McKay Development

Automatic market seller


darkwar123

Recommended Posts

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
        }
    };
Link to comment
Share on other sites

  • 3 weeks later...

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 :)

Link to comment
Share on other sites

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...