Back to Coding Projects
albion-profit-tracker — python app.py

$ python app.py

                   ___====-_  _-====___
             _--~~~#####//      \\\#####~~~--_
          _-~##########// (    ) \\\##########~-_
         -############//  :\^^/:  \\\############-
       _~############//   (@::@)   \\\############~_
       ~#############((    \\//     ))#############~
    -###############\\\    (oo)    //###############-
   -#################\\\  / "" \  //#################-
  -###################\\\/      \//###################-
  _#/:##########/\######(   /\   )######/\##########:\#_
  :/ :#/\#/\#/\/  \#/\##\  :  :  /##/\#/  \/\#/\#/\#: \:
  "  :/  V  V  "   V  \#\: :  : :/#/  V   "  V  V  \:  "
     "   "  "      "   \ : :  : : /   "      "  "   " 
▐▓▓▓▓▌▐▓▌   ▐▓▓▓▓▌ ▐▓▓▓▓▓▌▐▓▓▓▓▌▐▓▌ ▐▓▌
▐▓▌▐▓▌▐▓▌   ▐▓▌ ▐▓▌  ▐▓▌  ▐▓▌▐▓▌▐▓▓▌▐▓▌
▐▓▓▓▓▌▐▓▌   ▐▓▓▓▓▓▌  ▐▓▌  ▐▓▌▐▓▌▐▓▐▓▐▓▌
▐▓▌▐▓▌▐▓▌   ▐▓▌ ▐▓▌  ▐▓▌  ▐▓▌▐▓▌▐▓▌▐▓▓▌
▐▓▌▐▓▌▐▓▓▓▓▌▐▓▓▓▓▌ ▐▓▓▓▓▓▌▐▓▓▓▓▌▐▓▌ ▐▓▌

Albion tax calculator and profit tracker.

==============================
   HYBRID INVENTORY SYSTEM
==============================

1. Archive from Local Calculator (Excel)
2. Recall (Search) Product from Database
3. Exit

5. See ID naming scheme
6. Write to calculator
7. Silver to Gold Exchange Profit tracker
ALBION PROFIT TRACKER

Every batch, costed properly.

Albion Online · market profit tracker

Albion Profit Tracker started out as a simple console program that allowed you to put in an input cost and an output cost to see if you would make a profit on a market with a hard tax amount. But soon it morphed into a project with multiple moving parts and a database to show visual representation of the data logged.

It runs two ways. A Streamlit app holds the dashboard and the analytics; a terminal console handles quick archiving straight off the calculator spreadsheet. Both write to the same local ledger, so the numbers never drift apart.

Built to answer one question honestly: Is this worth buying input materials from the market? Or is it worth buying the raw materials and manufacturing everything myself?

PYTHONSTREAMLITPANDASPLOTLYOPENPYXLPYINSTALLER
Scroll

SCREEN 01

Dashboard

The landing screen. Five headline numbers across the top, then every open order as a table. Tick the rows that have sold, hit the button, and the profit rolls into your career total and the ledger.

Albion Profit Tracker sidebar branding
Portfolio Value4,189,108
Career Profit708,057
Open Orders13
Capital Tied Up1,370,378
Hit Rate80%

Career Profit is not representative of current profit if silver is currently tied up in sell orders.

Open Orders

IDItem NameCategoryInput Cost ($)Revenue ($)Net Profit ($)ROI
ID:2026-10-20-17-05-41Fort BearMounts191,204447,500256,297134.0%
ID:2026-10-14-13-05Voidwalker (T5)Mounts366,727479,253112,52630.7%
ID:2026-10-15-11-40Greater Bagpipe (T5)Mounts234,133338,294104,16144.5%
ID:2026-10-16-16-24Elder Cape (T5)Armor104,894161,51056,61654.0%
ID:2026-10-17-08-47Spectral Armor (T5)Armor88,945137,08548,14054.1%
ID:2026-10-19-14-32Justice Spear (T4)Weapons76,88994,24417,35522.6%
ID:2026-10-10-10-33Royal Firebrand (T4)Weapons58,09170,04411,95320.6%
ID:2026-10-07-08-22Repair Kit (T5)Consumables94,593103,6369,0439.6%
You have selected 1 row.

SCREEN 02

Add New Batch

Opening a new trade. Fill the form by hand and the profit is worked out live, or pull the batch straight out of the Excel calculator the app ships with.

Albion Profit Tracker sidebar branding

Manual Market Info Entry

Voidwalker (T5)
366,727
479,253
Mounts
112,526

Submission confirmation

BatchVoidwalker (T5)
Total Buy Amount366,727
Total Sell Amount479,253
CategoryMounts
Total Profit112,526

The Excel calculator is the source of truth for spreadsheet pulls. The app reads four cells out of it with openpyxl and never touches anything else.

PRODUCT NAMETOTAL BUYTOTAL SELLTOTAL PROFIT
Fort Bear191,204447,500256,297

AlbionProfitCalculator.xlsx · cells A2, E2, F5, G5

SCREEN 03

Analytics

Where the ledger becomes useful. Every realized trade is charted by month, by category and by capital efficiency, so you can see which items are actually paying and which are just busy.

Albion Profit Tracker sidebar branding
PerformanceProductsOpen OrdersCapital

Cumulative net profit

43,846
May
144,435
Jun
259,237
Jul
406,309
Aug
655,439
Sep
708,057
Oct

Each column is the running career total after a month of trading.

Profit realized each month

43,846
May
100,589
Jun
114,802
Jul
147,072
Aug
249,130
Sep
52,618
Oct

Bars are the profit realized each month.

Profit distribution by category

Armor
277,560
Mounts
208,108
Weapons
177,045
Refining
19,910
Consumables
13,451
Textiles
8,478
Metal
3,014
Leather
491

Where the career profit actually came from.

Win / loss split

80%
35 wins
9 losses
Avg win 20,857
Avg loss -2,438

35 of 44 realized trades were profitable.

Product lines sized by profit contribution

Armor
Mounts
Weapons
Refining
Consumables
Textiles
Metal
Leather

Shaded by relative return on capital.

Capital Summary

Liquid silver1,282,278
Capital in open orders1,370,378
Silver converted to gold905,400
Liquid silver1,282,278
Capital in open orders1,370,378
Silver converted to gold905,400
Total capital under management3,558,057
Unrealized profit on open orders631,052
Portfolio value4,189,108

1,500 gold bought for 905,400 silver (604 silver per gold).

SCREEN 04

Console Mode

The same app in a terminal. When you are already in the game and the batch is already in the spreadsheet, the console is faster than launching the GUI.

$ python app.py

==============================
   HYBRID INVENTORY SYSTEM
==============================

1. Archive from Local Calculator (Excel)
2. Recall (Search) Product from Database
3. Exit

5. See ID naming scheme
6. Write to calculator
7. Silver to Gold Exchange Profit tracker

Choose an option (1-3): 6

Enter name of batch:

Enter name of ID:

Enter category (Armor/Weapons/Mounts):

Enter quantity of input 1:

Enter price input 1:

...

Total upfront cost: 366,727

Total net sale: 479,253

total_profit: 112,526

Every option, and what it does

1

Archive from Local Calculator (Excel)

Pull the trade sitting in the spreadsheet straight into the local database.

2

Recall (Search) Product from Database

Look up any batch by ID and print its cost, revenue and profit.

3

Exit

Leave the console without writing anything.

5

See ID naming scheme

How product IDs are grouped: item, tier, batch.

6

Write to calculator

Cost a new batch from raw quantities and push it back to the spreadsheet.

7

Silver to Gold Exchange Profit tracker

Track bulk gold buys and the silver-per-gold you paid.

ID naming scheme

IDs are grouped by a number representing an item. 1-4-0001 represents item number 1, meaning a cape with tier 4 and a batch number of 0001. 1 = Fort Sterling Cape.

Silver to gold exchange

BatchGold BoughtSilver PaidCost per Gold
BATCH:2026-09-08-14-20600367,200612
BATCH:2026-10-05-09-42900538,200598

SCREEN 05

About Albion Profit Tracker

What the project is, how the pieces fit together, and the tax model behind every number.

Let's get technical. How does this work?

How it works

Streamlit has a few different ways to control the flow of pages. The main backbone of this project is a Streamlit function called navigation. The navigation function allows you to run a function depending on what sidebar icon or tab you select. The dashboard is the default tab, so that is what is selected first. Using this method of drawing pages, each page is basically a giant function that tells Streamlit how to display it.

It has a main file called stream.py, and that is essentially what runs when the app is launched. It also has a file called app.py, which is the console program that can run alongside the Streamlit app. These two run off two other files that contain functions returning data: charts.py and storage.py. All functions for writing to and reading from the database are in storage.py, and all the data used to plot charts is in charts.py.

Project map

stream.pyStreamlit UI and page navigation
app.pyConsole companion
storage.pyJSON and Excel read/write
charts.pyChart data builders
DB.jsonOpen orders
Ledger.jsonRealized profit history
Gold.jsonWallet and gold batches

The data layer

It has three JSON files that keep track of three different types of data. One is the active orders data, which is pulled from the Excel sheet. One is the ledger, which is the logged data for long-term records. And one is the wallet, for long-term profit entries and subtractions. All of this data is what the program uses to display analytics.


What I learned

I know little about the Excel library and the Plotly graph library. I used default layouts for the graphs and asked an AI to punch in my data and spice up the CSS. There is an insane amount of graphs that can be used and customized. The Excel library is pretty straightforward: I used the default way of pulling out hardcoded cells in the project directory for the app to read and write. I used a local spreadsheet from the open-source program LibreOffice, but I know you can use Python to pull from Google Sheets. If I return to this project, I will try to get an active cloud spreadsheet so multiple people can use the app through the cloud. This was a project just to see if I could do this. Right now it is for profit tracking, but knowing these methods, I know I can create realtime graphs or analytics for any kind of data. As long as there is a file with data, you can use the same methods in this project to display any kind of data.


Built with

PYTHONSTREAMLITPANDASPLOTLYOPENPYXLPYINSTALLER

The tax model

Total Buy Amountround(sum(input_qty x input_price) x 1.025)
Total Sell Amountround(output_qty x output_price x 0.895)
Total ProfitTotal Sell Amount - Total Buy Amount

The 2.5% purchase tax and the 10.5% sales tax are the Albion Online market rates. Change the two constants at the top of the app and every number downstream follows.

(GitHub link placeholder — will point to the repo once ticket is resolved.)

AlbionProfitCalculator.xlsx

Part of the coding collection.

This is a static walkthrough. The figures come from a seeded demo dataset — the real app reads and writes its own local JSON ledger.
Back to Coding Projects