Antoha — UI Functional Documentation


Project Overview

The Antoha buys items where they are cheapest, moves them between accounts if needed, and sells them where prices are higher.
It orchestrates Steam and third‑party marketplace accounts, evaluates arbitrage profitability via dynamic rules, and automates orders while giving operators transparency and control.

Common UI Component — Item Card

  • Always shows game icon, item name, rarity colour, and stickers (if any) as overlay thumbnails.
  • Hover pop‑over (universal): displays asset ID, float, pattern seeds,(if the item is owned) and quick links:
    • Price‑history sparkline (last 30 days) on each marketplace.
    • Live order‑book snapshot (HBO / LSO stacks) on source and destination markets.
  • Click opens the full Item drawer (price chart, historical order books, trades, etc.).

Table of Contents


1. Dashboard

1.1 Page Purpose

Provide a real‑time, filterable overview of platform performance—profitability, volume, order flow, and account health—so stakeholders can quickly assess how arbitrage operations are trending and drill down by account, rule, source market, and destination market.

GoalActor
Snapshot of overall profit & ROIManagement, Analyst
Identify top‑/bottom‑performing rulesAnalyst
Spot under‑utilised balancesOps
Compare markets or accountsTrader, Admin
Export metrics for reportingFinance

1.2 Global Filters (sticky top‑bar)

  • Date Range 📅  (Today, 7 D, 30 D, Custom)
  • Account ⌄   (multi‑select; All by default)
  • Rule ⌄      (multi‑select)
  • Source Market ⌄  (multi‑select)
  • Destination Market ⌄  (multi‑select)
  • Refresh 🔄  (auto every 60 s toggle)

All widgets react to the same filter set.

1.3 KPI Cards (first row)

CardFormula / SourceNotes
Total Realised Profit (USD)Σ(sellPriceUsd − buyPriceUsd) where status = SOLD_ON_DESTINATIONLarge green number, ↑/↓ vs previous period
Unrealised ProfitΣ(potentialSellPriceUsd − buyPriceUsd) for active arbitragesTooltip: counts BUYING, BOUGHT, SELLING
Average ROI %Avg of realised ROI per arbitrageBar sparkline inside card
Active ArbitragesCount where status ∈ {BUYING, BOUGHT, SELLING}Grey pill
Orders in NEW / SEND_ITEM / RECIEVE_ITEMCount groupedRed if > threshold
Utilised Balance %Σ funds locked in buy orders ÷ Σ available balanceHover shows per‑account split

1.4 Core Charts & Tables

#WidgetTypeInteractions
1Profit Over TimeLine chart (daily bucket)Hover daily realised & unrealised; click point → filter date
2Rule PerformanceHorizontal bar chartClick bar → isolates that rule
3Account LeaderboardTable: Account, Realised $, Unrealised $, ROI %Sortable; click row → open Accounts drawer
4Market Pair MatrixHeat‑map (src ↔ dest) by realised profitTooltip with count & avg ROI
5Volume & SpreadScatter: 7‑day volume vs avg spread %Point size = avg profit %; click → Analyzer pre‑filtered
6Order Status BreakdownDonut chartLegend click hides segment

1.5 Drill‑Down Panel

Selecting any datapoint opens a side panel with:

  • Snapshot filters applied
  • Mini KPI row specific to selection
  • Arbitrages tab — table (re‑uses Arbitrages page with frozen filter)
  • Orders tab — table (re‑uses Orders widget)

1.6 APIs & Backend Contracts

TODO

1.7 Performance & Caching

  • Metrics cached in Redis per filter hash for 30 s.
  • Heavy charts (>90 d span) computed async; UI shows skeleton + “Computing…” badge.
  • Live updates throttle to one per 5 s per widget.

1.8 Edge Cases & UX States

CaseUX
No data for selected filtersEmpty‑state illustration + “Broaden your filters” CTA
Partial outage (one widget fails)Widget shows error card with retry 🔄; rest render normally
Very large data (heat‑map > 400 cells)Auto‑switch to paged table view

1.9 Open Questions

  1. Should Unrealised Profit include arbitrages with status DROPPED but not sold?
  2. Need support for time‑zone toggling (UTC vs local)?
  3. Required export formats besides CSV (e.g., XLSX, PDF snapshot)?

2. Analyzer

2.1 Page Purpose

Provide a sandbox for crafting or loading Arbitrage Rules and instantly previewing which items qualify.

GoalActor
Test profitability hypotheses by tweaking filtersAnalyst
Inspect eligible items for an existing ruleTrader
Persist a new ruleAdmin
One‑click map rule → accountsAdmin

2.2 High‑Level Layout

Top‑bar:  Select Existing Rule ▼  •  Rule Name (editable)  •  Save  •  Map to Accounts

Body:     ┌──────────────┐  ┌─────────────────────────────┐
          │ Rule Builder │  │   Eligible Items Table      │
          │  (35% w)    │  │   (65% w)                 │
          └──────────────┘  └─────────────────────────────┘

Footer:   Result count • Last evaluated at

2.3 Rule Builder Form

FieldControlNotes
Source MarketSelectdefault BUFF163
Destination MarketSelectdefault STEAM
Price RangeMin + Max numericUSD, nullable open‑ended
Min Profit %NumericRequired
Max Profit %NumericOptional guard
priceOnSourceMarketForProfitCalculationEnum selectValues per entity
priceOnDestMarketForProfitCalculationEnum select —
purchaseStrategyEnum selectFROM_SELL_ORDER / SMART_BUY_ORDER
sellStrategyEnum selectTO_BUY_ORDER / SMART_SELL_ORDER / MARKET_SELL_ORDER
sourceMarketBuyToSellPriceOffsetCoefNumericVisible only if priceOnSourceMarketForProfitCalculation = BUY_TO_SELL_OFFSET_COEF
destMarketBuyToSellPriceOffsetCoefNumericVisible only if priceOnDestMarketForProfitCalculation = BUY_TO_SELL_OFFSET_COEF
Volume & OB FiltersRepeaterAdd MarketVolumeAndOrderBookFilter rows
Smart‑Buy / Smart‑Sell TweaksCollapsibleAdvanced fields

Interaction rules:

  • Debounced evaluation (500 ms) on change.
  • Offset‑coef fields auto‑show/hide.
  • Save disabled until rule validates.

2.4 Eligible Items Table

#ColumnDescription
1ItemName + rarity + stickers + hover popup
2Buy @ Source (calc)Price we would pay
3Current LSO (SRC)Live lowest sell order
4Current HBO (SRC)Live highest buy order
5Sell @ Destination (calc)Target sell price
6Current HBO (DEST)Live highest buy order
7Current LSO (DEST)Live lowest sell order
8Profit %(sellCalc − buyCalc) / buyCalc
97‑day VolumeFrom chosen market
10Spread % (SRC)(LSO−HBO)/LSO
11ActionsView history • Add to watchlist

Features: sortable, export CSV, row click opens Item drawer.

2.5 APIs & Data Flow

TODO

2.6 Interactivity & Performance

  • Skeleton while fetching; if >2 s, show progress bar.
  • Evaluation cancellable (“Running… Cancel”).
  • Virtual scroll for >5 k rows.

2.7 Edge Cases & Error States

CaseUX
Invalid rule (min > max)Red banner + field highlight
Evaluation timeoutToast + retry
Zero eligible itemsEmpty‑state illo

2.8 Open Questions

  1. Evaluation to respect isActive flag?
  2. Max items per eval (paging)?
  3. Allow editing of active rules or enforce copy‑as‑new?

3. Arbitrages

3.1 Page Purpose

Provide an operational view of every Arbitrage lifecycle—from initial buy order to final sale—so traders and operators can monitor progress, intervene, and analyse realised vs projected profit.

GoalActor
Track live arbitrages & profitabilityTrader, Analyst
Filter by stateOps
Move arbitrage to another accountOps, Admin
Cancel / drop arbitrageOps
Drill‑down into historyAnalyst

3.2 High‑Level Layout

Top‑bar:  Status ☐Active ☐Bought ☐Selling ☐Sold ☐Dropped • Account ▼ • Rule ▼ • Date 📅 • Search 🔍
Body:     Arbitrages Data‑Table
Footer:   n results • Last refreshed … • Auto‑refresh toggle

3.3 Status Definitions

CodeLabelBadge
BUYING_ON_SOURCEBuyinggrey
BOUGHT_ON_SOURCEBoughtblue
SELLING_ON_DESTINATIONSellingamber
SOLD_ON_DESTINATIONSoldgreen
DROPPEDDroppedred

3.4 Table Columns

#ColumnDescription
1Multi‑select
2ItemName + stickers
3AccountLogin
4RuleSnapshot name
5StatusBadge (see 3.3)
6Buy Price USDStored buy price
7Potential Sell USDStored target
8Current Dest HBOLive price
9Current Profit %(currentDestBuy − buyPrice)/buyPrice
10CreatedTimestamp
11UpdatedTimestamp
12View • Move • Cancel

3.5 Row Drawer

SectionContent
TimelineState transitions with timestamp & note
Price HistoryChart of buy, potential, current prices
Rule SnapshotPretty JSON diff
OrdersRelated BUY/SELL orders list (links to Orders page)
Account InfoQuick link to Accounts drawer
Owned ItemAsset ID & inspect link

3.6 Actions & Modals

ActionFlow
MoveSelect target account → POST /arbitrages/{id}/move
Cancel/DropReason textarea → POST /arbitrages/{id}/cancel
Bulk MoveSame modal supports many IDs
Export CSVTop‑bar

3.7 Filtering & Query Params

FilterParam
Statusstatus[]
AccountaccountId[]
RuleruleId[]
Date rangecreatedFrom, createdTo
Searchq

3.8 APIs & Data Contracts

TODO

3.9 Interactivity & Performance

  • Virtual scroll for big sets.
  • Auto‑refresh 30 s; pause on heavy filter edits.
  • Profit cell flashes on change.

3.10 Edge Cases & Error States

CaseUX
Item not in expected inventoryWarning banner
Move fails (cooldown)Modal error
Negative profitCell text red + tooltip

3.11 Open Questions

  1. Use highest buy or lowest sell for Current Profit %?
  2. Bulk move rate‑limit?
  3. Show order IDs in table?

4. Accounts

4.1 Page Purpose

Compact control‑panel for creating, viewing, and maintaining every Steam account used in arbitrage trading.

GoalActor
View balances & healthTrader, Analyst
Copy login/password/TOTPOps
Refresh balances or confirmationsOps
Create / import accountAdmin
Edit limited settingsAdmin

4.2 Key Layout

Top‑bar : Selected Accounts • Search • Bulk‑Jobs ▼ • + New Account
Table   : Compact data‑table (min‑info)
           Row click → inline details panel
Footer  : Paging • "Last sync at …"

4.3 Visible Table Columns

#ColumnUX
1Multi‑select
2LoginCopy‑to‑clipboard
3PasswordMasked + eye‑reveal
4TOTPRolling code
5ConfirmationsBadge (#)
6Balance USDHover split
7Inventory USD"—" if none
8Marketplace APIIcon strip
9StatePill
10Row menu

4.4 Row‑Expand / Details Panel

SectionFields
Account MetaSteamID64, creation, level, proxy, last update
Trade URLCopy / open
Per‑MarketplaceTable of balances, API status, sync time
Health AlertsBans, guard, escrow

4.5 Bulk‑Jobs Menu

Refresh balances, refresh confirmations, export inventories, mass disable, etc.

4.6 Modals & Drawers

  • Create Account wizard (Credentials → Marketplaces → Review)
  • Edit Account (TBD fields)
  • Inventory Drawer (items + arbitrage tags)

4.7 Hover‑Split Balance Popover

┌─────────────────────┐
│ Steam        $12.45 │
│ Bitskins      40.00 │
│ Skinport       8.13 │
│ ------------------- │
│ Total        $60.58 │
└─────────────────────┘

4.8 APIs & Data Contracts

TODO

4.9 Edge Cases & Error States

Missing API key, rate‑limit spinner, role‑restricted password copying, etc.

4.10 Open Questions

Editable‑field list, confirmation refresh cadence, marketplace limit per account.


5. Orders

5.1 Page Purpose

Display all BUY and SELL orders across every market account for full operational visibility.

GoalActor
Monitor order statesTrader
Filter by type, market, accountOps
Cancel/refresh stale ordersOps
Export historyAnalyst

5.2 High‑Level Layout

Top‑bar: Type ☐Buy ☐Sell • Status ▼ • Market ▼ • Account ▼ • Date 📅 • Search 🔍 • Bulk Actions ▼
Body   : Orders Data‑Table
Footer : n results • Last refreshed … • Auto‑refresh toggle

5.3 Status Definitions (badge colours)

StatusColour
NEWgrey
SEND_ITEMamber
RECIEVE_ITEMamber
PARTIALLY_FILLEDblue
FULFILLEDgreen
CANCELLEDred
CANCELLED_PARTIALLY_FILLEDred‑outline
BUFF_AWAITING_PAYMENTpurple
BUFF_AWAITING_CONFIRMATIONpurple
BUFF_CONFIRMATION_COMPLETEDteal
BUFF_CONFIRMATION_FAILEDred

5.4 Table Columns

#ColumnDescription
1Multi‑select
2ItemName + stickers
3TypeBUY / SELL pill
4MarketBUFF163, STEAM, etc.
5AccountLogin
6Price (native)price + currency
7Price USDNet price
8Qtyqty
9FilledfilledQty
10StatusBadge (see 5.3)
11ArbitrageID link / —
12TradeOfferLink if present
13CreatedTimestamp
14UpdatedTimestamp
15Cancel • Refresh

5.5 Row Drawer

SectionDetails
TimelineStatus changes + fill Qty
Owned ItemsAsset IDs list
Raw PayloadCollapsible JSON
Arbitrage ContextBadge + link

5.6 Bulk Actions & Modals

Cancel orders, refresh status, export CSV.

5.7 Filtering & Query Params

Type, status, market, account, date range, search.

5.8 APIs

TODO

5.9 Interactivity & Performance

Virtual scroll, auto‑refresh 15 s, status flash on change.

5.10 Edge Cases

Missing TradeOffer, Buff confirmation failed, cancel rejected by API.

5.11 Open Questions

Price per item column? Edit open BUY order price? Bulk SEND_ITEM helper?