quer/the-steam-awards

[Feature Request] Trade Module

Stiphr opened this issue · 4 comments

Stiphr commented

Trade Inventory to specific account
Something like this https://github.com/Stiphr/Steam-Bulk-Trade-Bot

quer commented

Hey, i did look into this at some point. But i cant remeber why i did not add it.
but have just done a quick google search. And i cant find any trade npm module. That work whit the npm steam.
all and like the one you send , is build around npm steamcommunity.

Eather i have to change from using the npm steam, to npm steamcommunity. or find one that is build on the npm steam

Stiphr commented

npm steam package provides a lower-level interface to interact with the Steam network compared to npm steamcommunity also, npmsteam is outdated. I think you should consider build using steamcommunity

steamcommunity have a rate limit for logins upto 30 seconds between logins, maybe steam-user then.

But to use steamcommunity it is enough to create object and clone cookies from websession
const _community = new SteamCommunity();
_community.setCookies(cookies);
try it out


to make a trade with second step, you can use steam-tradeoffer-manager package like this:

                const TradeOfferManager = require('steam-tradeoffer-manager');
		const manager = new TradeOfferManager({
			'language': 'en',
			'pollInterval': 7000,
			'community': _community,
		});
               manager.createOffer(steamId, token)
quer commented

You are right that npm steam is a lower-level interface, That is what i like about it, that there is not a lot off over head stuff, that is called. And that i can build the request part, to fit, and work as i want it to.

As in SteamCommunity, there is a components, that will use it own request module, insted of the once that i have build the hole project around. But the bigges problem is that, SteamCommunity, doent connect to the steam socket, So all modules that need to play a game, cant. as it more or less just get the cookies. and then do request whit them.

Then we will have to be both. That is too much, to add lib like SteamCommunity, just to do Trading. I did see that you can just paste in Cookies into SteamCommunity, and then it will use that. But i am at the state where i will better do the rewite the trading module, to fit what i have. then adding more lib, to the project. to just get 1 module to work.

i did look into steam-user, but this line here. made be stop:
https://github.com/DoctorMcKay/node-steam-user/blob/a8c0dd16304fea728851f840a58c14c04595c1ef/components/09-logon.js#L650
As it force the Console to enter a new Steam Guard, But that is a big No go. As i have build this up, to run multi account at once. Then it doent work, that it is running eks 10 at once, and 1 or maby more, will make the project stop, and wait. and the message it self, doent say what account it it using.

So even that the npm steam is outdated. it is from what i see the best fit, to what this project provide.

and currenly i doent see fit, to use time on make the npm steam-tradeoffer-manager fit into the project/module. as there is so many exampel on how to empty a account to a other account. So once you have to do that. Then just run that.