Portfolio API
Manage and value your CS2 skin portfolio by linking your Steam inventory.Portfolio features require a linked Steam account. See Steam OpenID for setup and Portfolio System for the full vision.
All portfolio endpoints require authentication.
GET /api/v1/portfolio
Get the current portfolio valuation for the authenticated user.| Field | Type | Description |
|---|---|---|
total_value | integer | Total portfolio value in cents |
item_count | integer | Number of unique items |
holdings | array | Individual item holdings with current prices |
last_imported_at | string | Timestamp of last Steam inventory import |
Prices are in minor units (cents).
total_value: 245000 = $2,450.00POST /api/v1/portfolio/import
Import the authenticated user’s Steam inventory. Requires a linked Steam account.- Authenticated user
- CSRF token
- Steam account linked to the user’s profile
- Import cooldown not active
- 200 OK
- 429 Too Many Requests
- 400 Bad Request
Import Behavior
- Fetches the user’s full Steam CS2 inventory
- Matches items against the
itemstable bymarket_hash_name - Upserts holdings (creates new or updates existing)
- Records import metadata for cooldown tracking
- Per-user cooldown prevents excessive API calls to Steam (enforced via Redis)
Abuse Protection
- Cooldown period — enforced via Redis TTL per user ID
- Fail-closed — if Redis is unavailable, the import is denied (not allowed by default)
- Response body cap — Steam inventory API responses are size-limited
- SteamID validation — Steam IDs are validated before making API calls