API that retrieves low price games and finds if it has trading cards
Made to find out if a cheap game has trading cards. If so, find out if you can
make any profit from buying it and then seliing the cards in Steam's community market.
Clone with:
$ git clone https://github.com/LucasGenovese/Steam-API
Cd into "Steam-API" folder and install packages with:
$ npm install
Add a .env file:
$ touch .env
Finally, using any text editor, add the following line to the .env file:
API_KEY = *you steam api key*
Note By default it will fetch Steam store prices from the country you are in. Which may be different from where your account is located. If you want to change it to your accounts location you should modify the script in the line 116 and add at the end of the url
&cc=AR
where AR should be replaced by your country code.
Run the code using and keep it in the background:
$ node index.js
To test it open Postman and enter http://localhost:3000/game-list
, this will throw a list of all games that are profitable.
Alternatively you can filter by games you do not own using http://localhost:3000/user-game-list
.
Then add the following keys:
If you do not have steam parental enabled then leave the steamparental cookie empty
To get the value for each key go to your Steam Marketplace. Press f12 and go to Application -> Cookies and copy every matching name to its matching value in postman. Also don't forget to have the Steam account logged in the desktop app for it to work. Finally click "Send" in post man and wait. It takes arround 30 to 60 seconds depending on how many games you want it to show.
This is because Steam Marketplace does not exchange equally trading card prices for every game.
As you can see here Box Maze and CSGO have the same price in USD (both at USD$ 0,4) but when you change to ARS the price varies and makes it difficult to calculate profits.
Also if you do not use your steam credentials it will block you from Steam Marketplace for 2-3 minutes because you made too many requests.
If you want to implement this API in your own proyect don't forget to credit me!