Back to work From the early experiments folder

TF2 Market Experiment

An old script. A surprisingly long-lived blog post.

JavaScriptAsync programming2013
Original Team Fortress 2 screenshot showing 18 new items acquired, with item 18 displayed as a Mann Co. Supply Crate Key.
My original screenshot from the project: 18 new items acquired, with a Mann Co. Supply Crate Key on screen.

Opening the hood

When Steam’s Community Market was new, I got curious about how it worked. Some Team Fortress 2 items appeared at much lower prices than other listings, and buying one could turn into a race. I looked through the market’s browser code and built a JavaScript experiment that watched listings and attempted purchases below a chosen price.

I wrote it up in Anatomy of an Auto-Buying Script, published on October 15, 2013. The Internet Archive still has the article.

I used Ghost for that blog. Enjoying it led to another project: Yokai, a hosting service that provisioned Ghost blogs for people signing up.

More than a fast click

The interesting work was handling a system that kept changing while requests were in flight. My first version waited for each response. I rewrote it around asynchronous requests and callbacks, so receiving and processing a response became separate from starting the next request.

The script also tracked listings it had already checked, handled prices and fees, and used converted currency values when they were available. A purchase attempt could lose the race, so the response mattered as much as the request.

These were small pieces of JavaScript, but together they made a practical lesson in asynchronous programming and reading an unfamiliar web application.

The part that outlived the script

The experiment ended: I stopped running it after learning it violated Steam’s terms. The article explicitly shared an incomplete, nonfunctional example for explanation. This page documents that historical project; there is no active bot or downloadable buying tool here.

The post had a longer life. People found it, asked implementation questions, and left comments on my Steam profile. Some of those comments are still there more than a decade later.

The original article preserves my explanation from the time, including the decision to shut it down.