Fully automatic Backpack.tf & Scrap.tf trading bot written in TypeScript.
It fetches data from Backpack.tf and Scrapy.tf, compares their buy and sell prices of items and finally trades with their bots if profitable.
- First it initializes APIs it uses and gets items. Optionally creates Backpack.tf alerts for them.
- Because of the alerts, it can fetch unread notifications and mark them as read.
- From alerts, it gets needed data, such as the name of the item or price.
- Then it calculates profit, that the bot uses to check if it should trade the item by comparing prices between the two websites.
- It updates key (currency) price and item data every
KEY_UPDATE_INTERVAL
andITEMS_UPDATE_INTERVAL
respectively.
- Clone the repository.
git clone https://github.com/tomaszjagielka/ScrapyNode.git
- Install NPM packages.
npm install
- Configure your bot by editing the
template.env
file. - Rename the
template.env
file to.env
- Compile the project using
tsc
- Run the app using
start.bat
- Use
npm run app
to automatically build and run the app. - Use
tsc -w
to automatically recompile the project after every code change. - Use
npm run build
to automatically recompile and relaunch the app after every code change. - Use
npm run test
to run the tests and forcefully exit.