{"id":50549881,"url":"https://github.com/mwesterham/tf2-auto-profit","last_synced_at":"2026-06-04T02:30:27.649Z","repository":{"id":185997345,"uuid":"560704096","full_name":"mwesterham/tf2-auto-profit","owner":"mwesterham","description":"Node.js web application which aids in finding profitable trades for Team Fortress 2.","archived":false,"fork":false,"pushed_at":"2025-02-10T01:38:47.000Z","size":93,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T02:31:47.110Z","etag":null,"topics":["expressjs","nodejs","trading-algorithms"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mwesterham.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-11-02T04:24:19.000Z","updated_at":"2025-02-10T01:38:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"5b9deddf-289c-448a-9c48-6c2f33bdc6ee","html_url":"https://github.com/mwesterham/tf2-auto-profit","commit_stats":null,"previous_names":["mwesterham/tf2-auto-profit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mwesterham/tf2-auto-profit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwesterham%2Ftf2-auto-profit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwesterham%2Ftf2-auto-profit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwesterham%2Ftf2-auto-profit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwesterham%2Ftf2-auto-profit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mwesterham","download_url":"https://codeload.github.com/mwesterham/tf2-auto-profit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwesterham%2Ftf2-auto-profit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33887124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expressjs","nodejs","trading-algorithms"],"created_at":"2026-06-04T02:30:26.919Z","updated_at":"2026-06-04T02:30:27.643Z","avatar_url":"https://github.com/mwesterham.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Team Fortress 2 Auto Profit\n\n## Background\n\nTeam Fortress 2 (TF2) is a team-based first person shooter video game. Within TF2, there are cosmetic items that players can obtain through lootboxes (which are only unlockable through paying real money). Furthermore, players are able to trade items they obtain to one another in exchange for other items or virtual currency known as \"Keys\" and \"Refined Metal\". \n\nThis virtual currency can be obtained from crafting and trading but is also directly tied to real markets since Keys cost exactly $2.49 and can be purchased from the in-game shop. Refined Metal can only be obtained through crafting or trading.\n\nSo in general, if a player wanted to obtain cosmetic items, they would either trade for those items or attempt to get them from lootboxes. Since lootboxes are randomized, it is much more time and cost effective to trade for the items using virtual currency. Trading in TF2 is very similar to real stock trading in that we can purchase different items from real players and re-sell them to others as we please.\n\n## Description\n\nThis project aims to find profitable trades. If we are able to purchase an item for a price and then re-sell that item for higher we can profit. \n\nTo do this, we run a Node.js server with Express and poll the prices of a subset of items to search with various APIs (Prices.tf and Backpack.tf). From these APIs, we determine the current selling price and buy price of any given item and calculate the potential profit of buying that item from backpack.tf and re-selling that item on scrap.tf.\n\nThese trades must be excuted manually.\n\n## Setup\n\n1. Installing git\n\nPlease install git from https://git-scm.com/. This is to clone the repository and keep updated with the latest changes.\n\n2. Installing node\n\nThis server runs on Node.js so please install the LTS version from https://nodejs.org/.\n\n3. Cloning the website\n\nThis repository will run the server on your local machine, so we will be downloading the website onto it. Please navigate to a folder of your choosing **in the terminal**. In this example, we will use the Documents folder.\n\n`cd Documents`\n\n`git clone https://github.com/mwesterham/tf2-auto-profit.git --branch main`\n\n4. Now navigate to the directory of your cloned repo and install the modules\n\n`cd tf2-auto-profit`\n\n`npm install`\n\n5. After installing the node modules, it is time to setup your api key/tokens and configuration\n\n## Configuration\n\nIn order for the website to run properly, we will need to collect a couple important items. The most important is collecting your api key/tokens from backpack.tf.\n\n1. Sign on to https://backpack.tf/ with your steam account\n\n2. Write down your api key from https://backpack.tf/developer/apikey/view\n\n3. Write down your api token from https://backpack.tf/connections\n\n4. Rename the *config.json.template* file to *config.json* \n\n5. Then enter in your api key and token\n\n```\n{\n    \"BPTF_API_KEY\": \"XXXXXXXXXXXXXXXXXXXXX\",\n    \"BPTF_API_TOKEN\": \"XXXXXXXXXXXXXXXXXXXXX\",\n    \"USE_HTTPS\": false,\n    \"PORT\": 3000,\n    \"APP\": {\n        \"PROFILES_OF_INTEREST\": [\n            \"76561198453530349\"\n        ]\n    }\n}\n```\n\n6. You can also optionally add your backpack.tf account to the profiles of interest section to track your metal and key supplies on the website. (A popular trade bot's account is given as placeholder)\n\n```\n\"APP\": {\n    \"PROFILES_OF_INTEREST\": [\n        \"XXXXXXXXXXXXXXXXXXXXX\",\n        \"XXXXXXXXXXXXXXXXXXXXX\"\n    ]\n}\n```\n\n## Running the Website\n\nYou are now ready to run the bot after the setup and configuration of the website. Navigate to the root folder and begin the running the website.\n\n`cd Documents/tf2-auto-profit`\n\n`node server.js`\n\nIf all is well, you should see something like this:\n\n`[2023-01-25T20:00:41.957] [DEBUG] default - Example app listening at http://localhost:3000`\n\nNavigate to http://localhost:3000 to view your trade website!\n\n## Running the Website with Docker Helpful commands\n\n`docker build -t mwesterham/generic:tf2-auto-profit .`\n\n`docker login --username mwesterham`\n\n`docker push mwesterham/generic:tf2-auto-profit`\n\n`docker run -dp 127.0.0.1:3000:3000 mwesterham/generic:tf2-auto-profit`\n\n`docker rm -f \u003cCONTAINER_ID\u003e`\n\n`docker compose up -d`\n\nThen open `http://127.0.0.1:3000/`\n\n`docker compose down`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwesterham%2Ftf2-auto-profit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmwesterham%2Ftf2-auto-profit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwesterham%2Ftf2-auto-profit/lists"}