LibGuildWeekStats (1.0.0)
AI disclosure: Large parts of this library’s code were written with the help of an AI coding assistant (Claude by Anthropic). I review and test the code and maintain the library myself, but please keep this in mind and report any problems you find.
Required libraries
LibHistoire
LibAsync
Optional: Master Merchant (item prices), Tamriel Trade Centre (fallback prices), AwesomeGuildStore (trader locations), LibDebugLogger (debug log).
What it does
LibGuildWeekStats collects weekly statistics for trading guilds from the guild history (via LibHistoire) and makes them available to other addons. It has no user interface of its own; Guild Weekly Report is the addon that displays them.
Collected per guild and trader week:
Sales, guild tax, sellers, buyers and top items, also grouped by item type.
Gold donations and withdrawals.
Every trader bid, refund and direct hire, and an analysis of which bids won. Bids are kept permanently; the other weekly statistics only for the retention period.
The trader of each week and its location.
Snapshots of the guild bank value (when the guild bank is opened).
API overview
local lib = LibGuildWeekStats
lib:BuildWeekReport(guildId, timestampInWeek, options, callback) — full report of a trader week
lib:GetBidAnalysis(guildId) — bids by week and by trader
lib:GetItemPrice(itemLink) — price, source (“MM”, “TTC”, “NPC”, …)
lib:GetWeekRange(timestamp) / lib:GetWeekKey(timestamp) — trader week helpers
lib:IsGuildEnabled(guildId) / lib:SetGuildEnabled(guildId, true|false|nil)
lib:RegisterCallback(lib.callback.DATA_UPDATED, function(guildId) … end)
See the source code for all functions and callbacks.
Credits
sirinsidiator for LibHistoire, LibDebugLogger and AwesomeGuildStore (trader locations are read from its trader list).
votan for LibAsync.
The Master Merchant authors and maintainers for the price data.
The Tamriel Trade Centre team for the fallback price data.
Source code: github.com/gboeer/eso-guild-weekly-report (MIT license)

