All projects
2026In progress

Mercatum

A RuneScape 3 market intelligence platform and in-game plugin I'm building to make sense of Grand Exchange prices, trading opportunities, and player wealth.

About

Mercatum is a RuneScape 3 market intelligence platform I’m building, along with a Lua plugin that connects the game directly to my backend. The idea is to bring together market prices, trading information, wealth tracking, and eventually some community features in one place.

I’ve played RuneScape for years, and I’ve always found its economy interesting. There’s something about a game where people spend hundreds of hours collecting items, trading resources, and trying to make money that makes you want to dig into the numbers a little more.

There are already websites that track Grand Exchange prices, but I wanted to see what I could build myself, especially if I could connect that information to what was actually happening in-game.

What started as an idea for a market dashboard has turned into a much bigger project involving a Python API, multiple external data sources, a database, and a plugin written in a language I’d barely worked with before.

Apparently I have a habit of turning relatively simple ideas into significantly more complicated ones.

Why I started it

I’ve spent a ridiculous amount of time playing RuneScape over the years. Between leveling skills, completing quests, making money, and occasionally spending way too much time staring at the Grand Exchange, I’ve gotten pretty familiar with how the game works.

One thing that has always interested me is how much the economy changes. Prices fluctuate, trading volume varies, and an item that looks profitable on paper might be practically impossible to buy or sell at the price you expect.

There are tools out there that provide market information, but I wanted something that went a little further than just showing an item’s current price. I wanted to see how reliable that price was, whether an apparent trading opportunity was actually realistic, and how the information could be presented in a way that was useful without requiring me to jump between several different websites.

I also liked the idea of tracking my own wealth across different parts of the game. RuneScape has a lot of places to store items, and figuring out what everything is worth isn’t always straightforward.

Eventually, I started wondering whether I could build a plugin that collected some of that information from the game and sent it to my own backend for processing.

That sounded interesting enough to try, and Mercatum grew from there.

The market platform

The web application is built with Astro, with a Python backend using FastAPI. The backend pulls information from external RuneScape data sources, processes it, and exposes the results through my own API.

One of the bigger challenges has been figuring out what to do when those sources don’t agree or don’t have complete information.

An item might have a recent price but almost no trading volume. Another might have older pricing data that looks perfectly reasonable until you realize nobody has traded it recently. Simply taking the latest number and displaying it as an accurate market price isn’t always good enough.

I’ve been working on a normalization system that considers data freshness, trading volume, and which price sources are actually available. Depending on the information available, an item can be classified as active, low volume, stale, or inactive.

I’m also calculating potential trading margins, Grand Exchange taxes, estimated profit, and return on investment. The goal isn’t just to display a bunch of numbers, but to help distinguish between opportunities that might actually be worth looking at and ones that only appear profitable because the underlying data is unreliable.

There’s still plenty of work to do, and I don’t expect any system to predict the RuneScape economy perfectly. But working through these problems has been one of the more interesting parts of the project.

The in-game plugin

The plugin is probably my favorite part of Mercatum so far, partly because it’s something I hadn’t done before.

It’s written in Lua and runs inside the RuneScape client through a plugin framework. It provides an in-game interface for interacting with Mercatum without constantly switching back to a browser.

Getting the plugin talking to my FastAPI backend was a pretty satisfying milestone. It involved working through the framework’s permissions, HTTP access, plugin configuration, and figuring out how to structure the Lua code so I wasn’t cramming everything into one giant file.

I’ve separated functionality into services and UI modules, with different parts responsible for things like market requests, inventory information, wealth monitoring, and displaying the interface.

The market panel includes item searching and information such as prices, margins, taxes, estimated profit, and ROI. The longer-term goal is to make the in-game experience feel like a natural extension of the website rather than an entirely separate tool.

I’ve also spent a surprising amount of time on the interface itself. Making something functional is one thing, but making it compact, movable, resizable, and actually pleasant to use while playing the game is another.

Wealth tracking

One of the features I’ve been working on is tracking a player’s wealth across different storage locations.

RuneScape doesn’t exactly keep everything in one convenient inventory. Between your backpack, bank, equipped items, and metal bank, there’s a lot of information to account for.

The plugin collects item information from those sources and maintains snapshots of what it has seen. Those snapshots can then be sent to the backend, which calculates estimated values and returns totals for each source.

That sounds relatively straightforward until you start dealing with untradeable items, missing prices, items that need special valuation rules, and storage locations that aren’t always accessible.

For example, an item might not have a usable Grand Exchange price but still have a high-alchemy value. Others need fallback logic, and some simply can’t be valued reliably with the information available.

I’ve been building the system to handle those cases rather than pretending every item has a perfectly accurate market value.

Another challenge is persistence. The plugin needs to remember information from storage locations even when they aren’t currently open, without assuming that a previously recorded snapshot represents a live view of everything the player owns.

It’s been a good exercise in thinking about data reliability, state management, and the difference between information that’s current and information that’s simply the most recent thing available.

What I’ve learned

Mercatum has pushed me into areas of development I hadn’t spent much time working with before.

FastAPI has given me more experience designing backend endpoints, validating data, organizing application logic, and working with external services. The market calculations have also forced me to think about edge cases that aren’t immediately obvious when you’re just looking at a successful API response.

Lua has been another learning experience. I’ve worked with several programming languages throughout my computer science degree, but building an actual plugin inside someone else’s framework comes with its own set of challenges. You have to understand the framework’s lifecycle, permissions, available APIs, and UI components before you can get very far.

And then there’s the fun of debugging something that involves the game client, a Lua plugin, HTTP requests, a Python backend, and external data sources. When something doesn’t work, there are plenty of places where it could have gone wrong.

I’ve had more than a few moments where I thought something should have been simple, only to spend hours figuring out why it wasn’t.

But that’s also what makes it interesting. I’m not just following a tutorial or building something where every step has already been figured out for me.

Where I want to take it

The market tools and wealth tracking are the main focus right now, but I have a bigger vision for Mercatum.

I’d eventually like to add player profiles, hiscores, clan information, watchlists, and other tools that make the website useful beyond just looking up item prices.

I also want the website and plugin to work together more closely. The idea is that someone could use the plugin while playing and then visit the website to see more detailed information about their wealth, market activity, or whatever other features I eventually build.

Some of those ideas are still just ideas, and I’m trying to be realistic about how much work they’ll involve.

I’ve already learned that adding another feature to a project like this isn’t always as simple as putting another tab in the navigation.

Current status

Mercatum is still in active development. The Python backend, market data processing, and initial Lua plugin integration are underway, and I’ve been working on the market interface and wealth valuation system.

There’s still work to do on the user experience, data accuracy, persistence, and connecting everything into a cohesive application. Authentication and some of the larger community features are also part of the longer-term plan.

I don’t have a release date yet. Right now, I’m more interested in getting the underlying systems working reliably than rushing to put something online that only works half the time.

It’s definitely become a bigger project than I originally expected, but I’ve learned a lot from it already. And unlike some of my other programming projects, I can actually fire up RuneScape and use the things I’m building, which makes working on it a lot more fun.