Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cs2cap.com/llms.txt

Use this file to discover all available pages before exploring further.

The Portfolio API supports two complementary use cases: stateless valuation for one-off item lists you send in the request body, and saved portfolios that persist items and transactions under your account for ongoing tracking and historical analysis. Portfolio item limits are 1,000 items for Free and Starter accounts, 5,000 for Pro, and 10,000 for Quant — the same limit applies regardless of how items were added.

Portfolio management

POST /portfolio

Creates a new empty portfolio under your account. Auth: API key required
curl -sS -X POST \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Main Portfolio"}' \
  "$CS2C_API_BASE/portfolio"
Request body
{
  "name": "Main Inventory"
}
name
string
required
Display name for the portfolio.

GET /portfolio

Returns all saved portfolios for your account. Auth: API key required
curl -sS \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  "$CS2C_API_BASE/portfolio"

DELETE /portfolio/:id

Permanently deletes a portfolio and all of its saved items and transactions. Auth: API key required
curl -sS -X DELETE \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  "$CS2C_API_BASE/portfolio/YOUR_PORTFOLIO_ID"
portfolio_id
string
required
UUID of the portfolio to delete.

Valuation

POST /portfolio/value

Values a user-supplied item list using the current best ask across the selected providers. Use this for one-off valuations without creating a saved portfolio. Tiers: Free, Starter, Pro, Quant · Rate limit: Free 20 req/min · Starter 40 req/min · Pro 100 req/min · Quant 300 req/min
curl -sS -X POST \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items":[{"item_id":4994,"quantity":2},{"item_id":12632,"quantity":5}],"currency":"USD"}' \
  "$CS2C_API_BASE/portfolio/value"
items
array
required
Array of objects, each with item_id (integer) and quantity (integer). Maximum 100 items per request.
providers
string[]
Optional provider filter. Omit to use all available providers.
currency
string
default:"USD"
Target output currency (ISO 4217).
Request body
{
  "items": [
    { "item_id": 1, "quantity": 3 }
  ],
  "providers": ["steam", "buff163"],
  "currency": "USD"
}
Response example
{
  "meta": {
    "currency": "USD",
    "generated_at": "2026-03-24T12:00:00Z",
    "providers_queried": ["steam", "buff163"]
  },
  "data": {
    "line_items": [
      {
        "item_id": 1,
        "market_hash_name": "AK-47 | Redline (Field-Tested)",
        "phase": null,
        "quantity": 3,
        "best_ask": 2550,
        "item_value": 7650,
        "providers": []
      }
    ],
    "total_value": 7650,
    "items_valued": 1,
    "items_not_found": []
  }
}
data.line_items
array
Per-item valuation results.
data.total_value
number
Sum of all item_value entries.
data.items_valued
integer
Number of items successfully priced.
data.items_not_found
array
Item IDs from the request that could not be matched in the catalog.

GET /portfolio/:id/value

Values all items currently in a saved portfolio using live market prices. Auth: API key required
curl -sS \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  "$CS2C_API_BASE/portfolio/YOUR_PORTFOLIO_ID/value?currency=USD&providers=buff163"
portfolio_id
string
required
UUID of the portfolio to value.
currency
string
default:"USD"
Target output currency (ISO 4217).
providers
string[]
Optional provider filter. Repeat to pass multiple values.
This is a live valuation based on current indexed prices, not a historical replay.

Import and export

POST /portfolio/:id/import

Imports items from your linked Steam inventory into a saved portfolio. If you omit asset_ids, the full inventory is imported. Auth: API key required + linked Steam account
curl -sS -X POST \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "$CS2C_API_BASE/portfolio/YOUR_PORTFOLIO_ID/import"
portfolio_id
string
required
UUID of the destination portfolio.
Request body (optional asset filter)
{
  "asset_ids": ["1234567890", "1234567891"]
}
Items already saved under the same Steam asset ID are skipped automatically. Items that cannot be matched to a catalog entry are returned in unresolved and are not stored.

POST /portfolio/:id/import/csv

Uploads a CSV file to bulk import transactions or snapshot-style holdings into a portfolio. Auth: API key required
curl -sS -X POST \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  -F "file=@transactions.csv" \
  "$CS2C_API_BASE/portfolio/YOUR_PORTFOLIO_ID/import/csv"
portfolio_id
string
required
UUID of the destination portfolio.
Both ledger and snapshot CSV formats are supported. The format is detected automatically from the CSV headers. Buy transactions imported from CSV can create missing portfolio items automatically.

GET /portfolio/:id/export

Downloads portfolio data as a CSV file. Auth: API key required
curl -sS \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  -o portfolio.csv \
  "$CS2C_API_BASE/portfolio/YOUR_PORTFOLIO_ID/export?type=transactions"
portfolio_id
string
required
UUID of the portfolio to export.
type
string
default:"transactions"
Export format. One of: transactions, items.

Portfolio items

GET /portfolio/:id/items

Returns the items currently stored in a portfolio. Auth: API key required
curl -sS \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  "$CS2C_API_BASE/portfolio/YOUR_PORTFOLIO_ID/items"
portfolio_id
string
required
UUID of the portfolio.

POST /portfolio/:id/items

Manually adds one item to a portfolio. Auth: API key required
curl -sS -X POST \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"item_id":4994,"quantity":2}' \
  "$CS2C_API_BASE/portfolio/YOUR_PORTFOLIO_ID/items"
portfolio_id
string
required
UUID of the portfolio.
item_id
integer
Catalog item ID. Provide either item_id or market_hash_name.
quantity
integer
required
Number of units to add.
phase
string
Phase variant for Doppler/Gamma items, or null.
Request body
{
  "item_id": 12632,
  "quantity": 2,
  "phase": null
}

DELETE /portfolio/:id/items/:entry_id

Removes a saved portfolio entry. Auth: API key required
curl -sS -X DELETE \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  "$CS2C_API_BASE/portfolio/YOUR_PORTFOLIO_ID/items/YOUR_ENTRY_ID"
portfolio_id
string
required
UUID of the portfolio.
entry_id
string
required
Portfolio entry UUID. This is the UUID assigned to the portfolio entry — it is not the catalog item_id.
entry_id is the portfolio entry UUID, not the catalog item_id. You can retrieve it from GET /portfolio/:id/items.

Transactions

GET /portfolio/:id/transactions

Returns the portfolio’s buy/sell ledger, newest first. Auth: API key required
curl -sS \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  "$CS2C_API_BASE/portfolio/YOUR_PORTFOLIO_ID/transactions"
portfolio_id
string
required
UUID of the portfolio.

POST /portfolio/:id/transactions

Records a buy or sell transaction for an item in the portfolio. Auth: API key required
curl -sS -X POST \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"item_id":4994,"type":"buy","quantity":1,"price":53000,"date":"2026-03-15","currency":"USD"}' \
  "$CS2C_API_BASE/portfolio/YOUR_PORTFOLIO_ID/transactions"
portfolio_id
string
required
UUID of the portfolio.
item_id
integer
Catalog item ID. Provide either item_id or market_hash_name.
type
string
required
Transaction direction. One of: buy, sell.
quantity
integer
required
Number of units transacted.
price
number
required
Price per unit in the specified currency.
date
string
required
Transaction date in YYYY-MM-DD format.
marketplace
string
Marketplace where the transaction occurred (e.g., skinport).
currency
string
required
Currency for the price (ISO 4217).
Request body
{
  "item_id": 1,
  "type": "buy",
  "quantity": 1,
  "price": 2500,
  "date": "2026-03-24",
  "marketplace": "skinport",
  "currency": "USD"
}
Buy transactions can automatically create portfolio items for items not yet tracked in the portfolio.

PATCH /portfolio/:id/transactions/:tx_id

Partially updates an existing transaction. Auth: API key required
curl -sS -X PATCH \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"quantity":2,"price":52500}' \
  "$CS2C_API_BASE/portfolio/YOUR_PORTFOLIO_ID/transactions/YOUR_TX_ID"
portfolio_id
string
required
UUID of the portfolio.
transaction_id
string
required
UUID of the transaction to update.
quantity
integer
Updated unit count.
price
number
Updated price per unit.
date
string
Updated date in YYYY-MM-DD format.
fee_amount
number
Absolute fee paid, in the transaction currency.
fee_percentage
number
Fee as a percentage of the transaction total.
marketplace
string
Updated marketplace name.
note
string
Free-text note for this transaction.
currency
string
Updated transaction currency (ISO 4217).

DELETE /portfolio/:id/transactions/:tx_id

Permanently deletes a transaction from the portfolio ledger. Auth: API key required
curl -sS -X DELETE \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  "$CS2C_API_BASE/portfolio/YOUR_PORTFOLIO_ID/transactions/YOUR_TX_ID"
portfolio_id
string
required
UUID of the portfolio.
transaction_id
string
required
UUID of the transaction to delete.

Historical valuation

GET /portfolio/:id/history

Rebuilds daily portfolio values from the transaction ledger. Returns a time series of portfolio worth over the selected date range. Auth: API key required
curl -sS \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  "$CS2C_API_BASE/portfolio/YOUR_PORTFOLIO_ID/history?lookback=30d&currency=USD"
portfolio_id
string
required
UUID of the portfolio.
start_date
string
Inclusive start date in YYYY-MM-DD format.
end_date
string
Inclusive end date in YYYY-MM-DD format. Defaults to today.
lookback
string
Optional window such as 30d. When provided, it overrides start_date.
currency
string
default:"USD"
Target output currency (ISO 4217).
providers
string[]
Optional provider filter. Repeat to pass multiple values.
limit
integer
Maximum number of daily data points to return.
cursor
string
Opaque cursor from the previous page for cursor-based pagination.
Historical valuation is daily only. Each day’s value uses the best available price across your selected providers. If no price update exists for a given day, the most recent available price is used. pagination.total is always -1 — use next_cursor to paginate.
Last modified on May 23, 2026