← back

Warframe Trade Bot

Dec 2022 · python · imgui · rest · market-data · repo

A desktop tool I built while at university to find profitable trades in Warframe’s player-driven item market. It polls the official market API for a configured list of items, computes a few different averages over the open listings, and flags opportunities where the cheapest seller is meaningfully below the consensus price. Pinning, in-game purchase commands copied to clipboard, and Windows toast notifications round out the GUI.

What the tool does

For each item on a configurable watch list:

  1. Fetch the open order book from warframe.market
  2. Compute three averages:
    • Raw average of all active sell listings
    • Normalised average, ignoring listings from sellers who have been offline long enough that the listing probably doesn’t reflect the current market
    • Estimate price, the optimal average — discards outliers far from the normalised average to handle stale or fat-finger listings
  3. Compare the cheapest seller’s price against the estimate
  4. If the gap exceeds a configured threshold (e.g. 20 platinum), surface an alert: a UI card, optionally a Windows notification with sound, and a pre-formatted in-game whisper saved to clipboard

Stack

Python 3 with imgui for the UI, plus a Windows-specific batch installer that pulls dependencies via pip. The GUI uses single-instance enforcement (one running instance per machine) and a small wrapper around Windows notification APIs.

Design decisions worth calling out

Treating stale listings as different from active ones

A naive raw average is dominated by listings from people who set a price weeks ago and forgot. Real markets move; the tool treats those as ghosts. The normalised average drops them. The estimate average then drops anything still too far from the normalised one. Each step exists to filter a different kind of noise.

This is the same instinct as treating a feed handler’s top-of-book update seriously vs an order book snapshot’s recency for that matter, just applied to player listings instead of exchange data.

Sale min and sale max as a directional indicator

The tool tracks the rolling minimum and maximum prices it has seen for an item since launch. Comparing the current cheapest to those bounds gives a quick sense of whether the market is moving down (new lows) or up (new highs) for that item over the session. Not predictive, just informational, but it genuinely helped catch moments where someone undercut significantly and I could buy before the rest of the book caught up.

Per-item config, not a database

Items, ranks, profit thresholds, and notification flags all live in a flat config that’s edited directly. No persistence layer, no schema migrations. For a single-user desktop tool that never grew beyond me, this was the right call. A more “proper” version would use SQLite or similar, but the cost wouldn’t have been justified.

Honest assessment

This is old code from when I was still figuring out how to write market code at all. The architecture is loose, error handling is patchy, the GUI logic and the data logic are tangled together in places. I’d structure it very differently today: a clean separation between the API client, the analysis layer, and the display, with retries and rate limiting on the API client and proper logging throughout.

Source

This one is public on GitHub, the link is in the metadata above. A read-only snapshot synced at build time is also browsable here:

Browse the source →