Skip to content

offish/tf2-arbitrage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tf2-arbitrage

License Stars Issues Size Discord Code style

Bot for arbitraging TF2 items on different sites for profit.

This bot will find deals, request trades and notify tf2-express to accept.

Donate

You can reach me at Steam, my Discord server or Discord profile.

How does it work?

  • Using a Firefox profile, login to the sites listed below
  • Will check MongoDB for saved cookies
  • If outdated, get new cookies using Selenium
  • Save cookies, such that requests can imitate a legitimate internal API request
  • Fetches prices from Prices.tf as a comparison basis
  • Fetches prices from STN, taking stock into consideration
  • Fetches prices from Quicksell.store
  • Fetches prices from Sfuminator
  • Compares prices between sites, and finds deals
  • If a Prices.tf price is included in a deal, check Backpack.TF for buyers/sellers with a matching price
  • If buyer/seller is from Backpack.TF, get their Trade URL
  • Save up to 3 pages of classifieds for Trade URLs, so they can be used later (can skip fetching)
  • Send deals using a TCP socket so tf2-express can act on the trades
  • When tf2-express has accepted a "buy deal" trade offer, send the "sell deal" request to one of the trading sites (different for Backpack.TF)
  • Repeat step 6-16 (fetching Prices.tf is uneccessary when we are connected to the websocket)

Supported sites

  • Backpack.TF
  • STNTrading.eu
  • Quicksell.store
  • Sfuminator.tf

Scrap.TF is not supported, due to their ToS.

Installation

  • Clone the repo and install the packages pip install -r requirements.txt
  • The bot uses MongoDB, so pymongo needs to work
  • Install geckodriver

Setup

  • Have a tf2-express bot setup and ready to go
  • If geckodriver is not added to PATH, this needs to be specified in GECKODRIVER_EXECUTABLE_PATH in the config. If it is in PATH, do not change this value
  • Create a new Firefox profile and login to all the sites listed above (STN is not neccessary). Copy the Root Directory of this Firefox profile. This is your FIREFOX_PROFILE_PATH in the config
  • Register a STN API key at https://stntrading.eu/dev/apikey
  • Make sure you have credits for your API calls. This can be increased at https://stntrading.eu/dev/credits

Configuration

  • Specify STEAM_ID in the config, this has to match the SteamID64 for the owner of the STN API key
  • Other optional modifications to the config

Running

  • Start tf2-arbitrage by running python main.py
  • Start a tf2-express instance

Releases

No releases published

Packages

No packages published

Languages