GithubHelp home page GithubHelp logo

arthurfiorette / steam-trader Goto Github PK

View Code? Open in Web Editor NEW
40.0 1.0 4.0 1.73 MB

๐Ÿ“ˆ Trade items smartly with multiple automated steam accounts at the same time!

Home Page: https://arthur.run/steam-trader

License: GNU General Public License v3.0

Dockerfile 1.33% TypeScript 97.25% Shell 0.48% HTML 0.62% JavaScript 0.32%
trade steam-api bot steam-trade-bot bot-api desktop steambot steamtrades steam-trade-offers steamapi

steam-trader's Introduction

Forks Issues Stars License

Steam Trader ๐Ÿ“ˆ

Trade items smartly with multiple automated steam accounts at the same time!

Docker builds are working better!
Check it out in v2.1.1!


๐Ÿ“– About

This project is an open source initiative to host multiple steam bot accounts to trade inventory items, automatically calculating the prices and items in each exchange sent and responding to them at the same time, like some Trading Card Exchange bots, but with any item. We still have a lot to improve, and that is what i'll do in the next days, Feel free to send a PR or open a new issue.

๐Ÿ“ Downloading

The main branch is used for development, to download the code, prefer to download a specific tag.

Open this repository releases tab and download the latest source code .zip file.

โš™๏ธ Configuration

A config.json file already existed in previous versions, however, now everything is officially configured by our panel. To access it, start the application correctly and go to localhost at the specified port.

๐Ÿ” SDA, Shared Secret and Identity Secret

To register a steam account with steam-trader, you need to know the Shared Secret and Identity Secret of your account. These two secrets are responsible for the automatic generation of the steam guard mobile code and auto reconnection.

To get them easily, you will need to enable SDA on the account and after that, you will find it here.

๐Ÿƒ Executing

You can host it docker on any hosting service that supports containerized applications or use docker locally, simply by typing:

For any help with docker, here are the docs.

# Install, build and run with docker
$ docker-compose up

# Or in detached mode:
$ docker-compose up -d

If you have no access or knowledge to use Docker, you can run it having Node.JS installed. As we have a package.json in our root containing some scripts, all you need to do is follow these steps.

Always prefer to use Docker, as this application was built based on it and is totally faster.

# Install yarn
$ npm i -g yarn

# Then install the app
$ yarn

# Build and compile all code.
$ yarn build

# Start concurrently the web and the app.
$ yarn start

After building and installing it for the first time, you are ready to go and you can start it every time only running the last command.

Security

We assume that all connections are secure and trustworthy, so we don't require any passwords. If you're hosting it on third-party services like AWS or Azure, make sure you only allow its IP address to connect to the web interface and server. You can also use a proxy between authenticated connections to prevent unauthorized requests.

๐Ÿ“ƒ License

Licensed under the GNU General Public License v3.0. See LICENSE for more informations.

๐Ÿ“ง Contact

See my contact information on my GitHub Profile Page or open a new issue.

steam-trader's People

Contributors

arthurfiorette avatar dependabot[bot] avatar todo-actions[bot] avatar wielorzeczownik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

steam-trader's Issues

Problem with starting steam-trader_app.

The problem after compiling the image and starting it, an error is returned that the module 'src/steam/currency' cannot be found:

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'src/steam/currency'
Require stack:
- /usr/local/steam-trader/app/build/transactions/logic/calculatePrices.js
- /usr/local/steam-trader/app/build/transactions/logic/index.js
- /usr/local/steam-trader/app/build/transactions/processor.js
- /usr/local/steam-trader/app/build/accounts/account.js
- /usr/local/steam-trader/app/build/accounts/controller.js
- /usr/local/steam-trader/app/build/server/routes/users.js
- /usr/local/steam-trader/app/build/server/routes/index.js
- /usr/local/steam-trader/app/build/server/index.js
- /usr/local/steam-trader/app/build/server/socket/transport.js
- /usr/local/steam-trader/app/build/logger.js
- /usr/local/steam-trader/app/build/ads.js
- /usr/local/steam-trader/app/build/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/usr/local/steam-trader/app/build/transactions/logic/calculatePrices.js:1:437)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/steam-trader/app/build/transactions/logic/calculatePrices.js',
    '/usr/local/steam-trader/app/build/transactions/logic/index.js',
yarn run v1.22.5
$ node build/index.js
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    '/usr/local/steam-trader/app/build/transactions/processor.js',
    '/usr/local/steam-trader/app/build/accounts/account.js',
    '/usr/local/steam-trader/app/build/accounts/controller.js',
    '/usr/local/steam-trader/app/build/server/routes/users.js',
    '/usr/local/steam-trader/app/build/server/routes/index.js',
    '/usr/local/steam-trader/app/build/server/index.js',
    '/usr/local/steam-trader/app/build/server/socket/transport.js',
    '/usr/local/steam-trader/app/build/logger.js',
    '/usr/local/steam-trader/app/build/ads.js',
    '/usr/local/steam-trader/app/build/index.js'
  ]
}
error Command failed with exit code 1.

Create all currencies.

In some DoctorMcKay node-steam-* repo I saw a complete implementation
https://github.com/DoctorMcKay

Here are all steam codes:

  • USD = 1, โœ“
  • GBP = 2, โœ“
  • EUR = 3, โœ“
  • CHF = 4, โœ“
  • RUB = 5,
  • PLN = 6,
  • BRL = 7, โœ“
  • JPY = 8,
  • NOK = 9,
  • IDR = 10,
  • MYR = 11,
  • PHP = 12,
  • SGD = 13,
  • THB = 14,
  • VND = 15,
  • KRW = 16,
  • TRY = 17,
  • UAH = 18,
  • MXN = 19,
  • CAD = 20,
  • AUD = 21,
  • NZD = 22,
  • CNY = 23,
  • INR = 24,
  • CLP = 25,
  • PEN = 26,
  • COP = 27,
  • ZAR = 28,
  • HKD = 29,
  • TWD = 30,
  • SAR = 31,
  • AED = 32,
  • ARS = 34,
  • ILS = 35,
  • vBYN = 36,
  • KZT = 37,
  • KWD = 38,
  • QAR = 39,
  • CRC = 40,
  • UYU = 41

This issue has been automatically created by todo-actions based on a TODO comment found in app/src/steam/currency.ts:59. It will automatically be closed when the TODO comment is removed from the default branch (main).

Multiple price sources.

It would be nice if the user could change the price source. Type to use with the backpack.tf api and so on.

Bug when logging in

[start:app] "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _process=require("process");var _steamTotp=_interopRequireDefault(require("steam-totp"));var _steamTradeofferManager=_interopRequireDefault(require("steam-tradeoffer-manager"));var _steamUser=_interopRequireDefault(require("steam-user"));var _steamcommunity=_interopRequireDefault(require("steamcommunity"));var _logger=_interopRequireDefault(require("../logger"));var _updater=require("../server/socket/updater");var _currency=require("../steam/currency");var _processor=_interopRequireDefault(require("../transactions/processor"));var _serializer=require("./serializer");var Account=function(){function Account(options){var _this=this;(0,_classCallCheck2["default"])(this,Account);this.options=options;(0,_defineProperty2["default"])(this,"client",new _steamUser"default");(0,_defineProperty2["default"])(this,"community",new _steamcommunity"default");(0,_defineProperty2["default"])(this,"manager",new _steamTradeofferManager"default");(0,_defineProperty2["default"])(this,"trader",new _processor"default");(0,_defineProperty2["default"])(this,"logger",void 0);(0,_defineProperty2["default"])(this,"login",function(){_this.logger.info('Attempting to logging In');if(_this.online){_this.logger.warn('Login attempt, but we are already logged in');return;}_this.client.logOn({accountName:_this.options.login.username,password:_this.options.login.password,twoFactorCode:_this.getAuthCode(),machineName:'steam-trader'});});(0,_defineProperty2["default"])(this,"logoff",function(){_this.logger.info("Attempting to log Off");if(!_this.online){_this.logger.warn('Logoff attempt, but we are already logged off');return;}_this.client.logOff();});(0,_defineProperty2["default"])(this,"onLoggedOn",function(_details,_parental){_this.logger.info('We logged in');_this.client.setPersona(1);if(_this.options.status.gameId!==-1){_this.client.gamesPlayed(Number(_this.options.status.gameId));}_this.update();});(0,_defineProperty2["default"])(this,"onDisconnect",function(resultId,msg){_this.logger.info("We logged off (".concat(resultId,"): ").concat(msg));_this.update();});(0,_defineProperty2["default"])(this,"onWebSession",function(_sessionId,cookies){_this.logger.debug('Started web session, delivering cookies');_this.manager.setCookies(cookies,undefined,undefined);_this.community.setCookies(cookies);_this.community.startConfirmationChecker(11000,_this.options.login.identity);});(0,_defineProperty2["default"])(this,"onSteamGuard",function(){var _ref=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(_domain,callback){var auth;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:auth=_this.getAuthCode();_context.next=3;return callback(auth);case 3:_this.logger.debug("Requested steam guard. Returned ".concat(auth));case 4:case"end":return _context.stop();}}},_callee);}));return function(_x,_x2){return _ref.apply(this,arguments);};}());(0,_defineProperty2["default"])(this,"onWallet",function(_hasWallet,currencyId){var name=_currency.CurrencyId[currencyId];if(!name){throw new Error("Currency ".concat(currencyId," unrecognized"));}_this.logger.debug("The currency used is '".concat(name,"'"));_this.options.status.currency=namename;});(0,_defineProperty2["default"])(this,"onError",function(err){_this.logger.error("Occurred an error on the last operation: ".concat(err));});(0,_defineProperty2["default"])(this,"getAuthCode",function(){var sharedSecret=_this.options.login.sharedSecret;var auth=_steamTotp["default"].generateAuthCode(sharedSecret);_this.logger.debug("Requested steam guard auth code '".concat(auth,"'"));return auth;});(0,_defineProperty2["default"])(this,"onNewOffer",function(){var _ref2=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(offer){return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_this.trader.begin(offer);case 1:case"end":return _context2.stop();}}},_callee2);}));return function(_x3){return _ref2.apply(this,arguments);};}());(0,_defineProperty2["default"])(this,"update",function(){(0,_process.nextTick)(function(){return(0,_updater.update)(_this);});});(0,_defineProperty2["default"])(this,"serialize",function(){return(0,_serializer.serializer)(_this);});this.logger=(0,_logger["default"])(options.login.username);this.logger.info("'".concat(options.login.username,"' was created, waiting for login..."));this.client.on('webSession',this.onWebSession);this.client.on('wallet',this.onWallet);this.client.on('error',this.onError);this.client.on('loggedOn',this.onLoggedOn);this.client.on('disconnected',this.onDisconnect);this.client.on('steamGuard',this.onSteamGuard);this.manager.on('newOffer',this.onNewOffer);}(0,_createClass2["default"])(Account,[{key:"online",get:function get(){return!!this.client.steamID;}}]);return Account;}();exports["default"]=Account;
[start:app]
[start:app]
[start:app] Error: Currency 0 unrecognized
[start:app] at SteamUser. (\steam-trader-main\app\build\accounts\account.js:1:3783)
[start:app] at SteamUser.emit (node:events:513:28)
[start:app] at SteamUser. (\steam-trader-main\app\node_modules\steam-user\components\account.js:207:7)
[start:app] at D:\CSGO FARM\steam-trader-main\app\node_modules\steam-user\components\classes\HandlerManager.js:37:12[start:app] at Array.forEach ()
[start:app] at HandlerManager.emit (\steam-trader-main\app\node_modules\steam-user\components\classes\HandlerManager.js:36:12)
[start:app] at SteamUser._handleMessage (\steam-trader-main\app\node_modules\steam-user\components\messages.js:631:24)
[start:app] at SteamUser._handleNetMessage (\steam-trader-main\app\node_modules\steam-user\components\messages.js:552:7)
[start:app] at SteamUser._processMulti (\steam-trader-main\app\node_modules\steam-user\components\messages.js:676:8)
[start:app] at processTicksAndRejections (node:internal/process/task_queues:96:5)
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[start:app] error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[start:app] error Command failed with exit code 1.
[start:app] yarn run start:app exited with code 1
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.