Skip to main content

Portfolio System

Tracera’s portfolio system connects to your Steam inventory, tracks your skin holdings, and provides real-time portfolio valuation.

Current State (Phase 6 MVP)

The MVP portfolio system is implemented:
  • Steam account linking via OpenID authentication
  • On-demand inventory import from Steam
  • Portfolio valuation using latest tracked prices
  • Import cooldown to protect Steam API rate limits
  • Abuse protection with fail-closed design

How It Works

1

Link Steam Account

Authenticate via Steam OpenID to link your Steam identity to your Tracera account.
2

Import Inventory

Trigger an on-demand import via POST /api/v1/portfolio/import. Tracera fetches your CS2 inventory from Steam.
3

Match Items

Imported items are matched against Tracera’s item database by market_hash_name.
4

View Valuation

Query GET /api/v1/portfolio for your total portfolio value based on latest tracked prices.

Data Model

-- What items you hold
user_portfolio_holdings (
    user_id, steam_asset_id, item_id,
    market_hash_name, quantity,
    imported_at, created_at, updated_at
)

-- Import metadata
user_portfolio_imports (
    user_id, last_imported_at,
    imported_assets, updated_at
)

Vision: Portfolio Volatility Score (Phase 7)

A single number that captures your portfolio’s overall risk level:
  • Weighted volatility — each item’s volatility weighted by its share of portfolio value
  • Portfolio beta — analogous to stock portfolio beta
  • Percentile ranking — “Your portfolio is more volatile than 73% of users”
  • Historical tracking — see how your portfolio’s risk changes over time

Vision: What-If Trade Simulator (Phase 9)

Before making a trade, simulate its impact:
  • Add/remove items from a virtual portfolio
  • See volatility impact — “This trade increases your portfolio volatility by 12%”
  • Value projection — estimated portfolio value based on trend analysis
  • Risk comparison — compare current vs proposed portfolio risk
Current Portfolio          After Trade
─────────────────          ───────────────
Value: $2,450              Value: $2,380
Volatility: 4.2            Volatility: 5.8 (+38%)
Items: 15                  Items: 14
Top risk: AWP Dragon Lore  Top risk: AWP Dragon Lore

Vision: Trade Journal (Phase 12)

Track your trading performance over time:
  • Log trades with notes and rationale
  • P&L tracking — profit and loss per trade
  • Win/loss ratio — overall trading performance
  • Best/worst trades — learn from history
  • Export — CSV and API access for external analysis