The basic model
Workflow 1: Value a submitted basket
Use stateless valuation when a customer gives you an inventory snapshot and you do not need CS2Cap to store it. Typical examples:- A trade calculator values both sides of a proposed deal.
- A marketplace CRM estimates the value of a customer’s submitted inventory.
- A risk workflow checks whether a basket is large enough to require manual review.
- A quoting engine calculates a buyout offer using a specific provider set.
item_id and quantity pairs to POST /portfolio/value. CS2Cap returns line-item values and a total using current best ask prices across the selected providers.
Workflow 2: Maintain saved customer portfolios
Use saved portfolios when your product needs to keep a durable record of a customer’s holdings. Start by creating a named portfolio withPOST /portfolio. Then populate it from whichever source your product supports:
Once holdings are stored, call
GET /portfolio/{id}/value whenever you need the live portfolio value. Provider filters let you value the same holdings against different markets, such as a Buff163-focused trading workflow or a Steam-focused consumer display.
Saved portfolios work well when your app needs repeatable reads:
- Customer-facing inventory dashboards
- Internal account-manager views
- Stored quote or loan collateral records
- Periodic portfolio reports
- CSV exports for customer support or finance teams
Workflow 3: Build cost basis and P&L reporting
Holdings alone tell you what a customer owns now. Transactions tell you how the portfolio got there. Record buys and sells withPOST /portfolio/{id}/transactions. Each transaction captures the item, direction, quantity, unit price, date, currency, marketplace, and optional fees or notes.
Use the transaction ledger when you need:
- Cost basis by item or portfolio
- Realized P&L from sells
- Unrealized P&L from current value minus cost basis
- Daily portfolio value charts
- Customer or account-manager performance reports
GET /portfolio/{id}/history. CS2Cap replays the transaction ledger into daily holdings and values those holdings from available market history.
How the API supports this
Operational notes
- Monetary values are returned in minor units. For USD,
2550means$25.50. - Live portfolio value uses current indexed prices, so it reflects the market data CS2Cap has available now.
- Historical portfolio value is replayed from the transaction ledger, not from current portfolio item rows.
- Provider filters are useful when your workflow values holdings against a specific marketplace or provider subset.
- Portfolio count and item limits are tier-scoped. Check account limits before creating many portfolios or large customer books.
- CSV imports are best for bulk onboarding, but your app should still reconcile imported rows against your own customer records.
When this is a good fit
- You want CS2Cap to handle catalog normalization and market valuation.
- You want your own app to own customers, reporting, permissions, billing, and UI.
- You need repeatable portfolio value checks without re-sending the full inventory every time.
- You need a transaction ledger for daily value history or P&L.
When this is not a good fit
- You need sub-day historical portfolio replay. Portfolio history is daily.
- You want CS2Cap to manage your end-customer accounts or business rules.
- You only need a one-time quote and do not need persistence; use stateless valuation instead.