π CS2 Market Index History - Historical Price & Volume Data
Baseurl: https://www.steamwebapi.com/steam/api/market-index/cs2/history?key=YOUR_API_KEY
π¬ **What this endpoint does:**
- Returns historical data for any metric with flexible time aggregation.
- Supports OHLC (Open/High/Low/Close) format for aggregated intervals.
- Perfect for building charts, trend analysis, and market dashboards.
π οΈ **Features:**
- **Multiple Metrics:** Track price index, volume, turnover, listings, and more.
- **Flexible Intervals:** From raw 1-minute data to yearly aggregates.
- **Multi-Metric Mode:** Request multiple metrics in a single API call.
- **OHLC Format:** Aggregated intervals return candlestick-ready data.
- **Segment Support:** Get history for any segment type/key combination.
π **Available Metrics:**
- `priceindex` - Steam price index (default)
- `buyorderpriceindex` - Buy order price index
- `sold24h`, `sold7d`, `sold30d` - Sales volume
- `turnover24h` - USD turnover
- `listings` - Active listings count
- `buyorders` - Active buy orders count
- `avgspreadpct` - Average bid-ask spread
- `avglistingprice` - Average listing price
- `sellthrough24hpct` - Sell-through rate
- `listingvalue` - Total listing value
- `orderbookvalue` - Total order book value
- `buypressureratio` - Buy/sell pressure ratio
- `gainerscount`, `loserscount`, `neutralcount` - Market sentiment
- `itemcount` - Marketable item count
β±οΈ **Available Intervals:**
- `raw` - Every data point (1-minute buckets)
- `fivemin` - 5-minute aggregates
- `tenmin` - 10-minute aggregates
- `hourly` - Hourly aggregates
- `sixhours` - 6-hour aggregates
- `daily` - Daily aggregates
- `threedays` - 3-day aggregates
- `weekly` - Weekly aggregates
- `monthly` - Monthly aggregates
- `threemonths` - Quarterly aggregates
- `sixmonths` - Semi-annual aggregates
- `yearly` - Annual aggregates
π― **Example Requests:**
- 24h raw price index: `?metric=priceindex&from=-24hours`
- Daily volume for 30 days: `?metric=sold24h&interval=daily&from=-30days`
- Multiple metrics: `?metrics=priceindex,sold24h,turnover24h&interval=hourly`
- Knife segment history: `?segment_type=item_group&segment_key=knife&metric=priceindex`
Request
- Base URL: https://www.steamwebapi.com
- URL: https://www.steamwebapi.com/steam/api/market-index/cs2/history
- Auth: API key in query parameter key
Query parameters
Your API key for authentication. Retrieve it from your Dashboard (top-right corner).
Single metric to retrieve. Default: priceindex. Ignored if metrics is set.
Available: priceindex, buyorderpriceindex, sold24h, sold7d, sold30d, turnover24h, listings, buyorders, avgspreadpct, avglistingprice, sellthrough24hpct, listingvalue, orderbookvalue, buypressureratio, gainerscount, loserscount, neutralcount, itemcount
Comma-separated list of metrics for multi-metric mode. Returns all metrics in a single response.
Example: priceindex,sold24h,turnover24h
Time aggregation interval. Default: raw (1-minute buckets).
Available:
- raw - Every data point (~1 min)
- fivemin - 5-minute aggregates
- tenmin - 10-minute aggregates
- hourly - Hourly aggregates
- sixhours - 6-hour aggregates
- daily - Daily aggregates
- threedays - 3-day aggregates
- weekly - Weekly aggregates
- monthly - Monthly aggregates
- threemonths - Quarterly aggregates
- sixmonths - Semi-annual aggregates
- yearly - Annual aggregates
Note: Aggregated intervals return OHLC format (open/high/low/close).
Segment type to get history for. Default: global
Available types: global, item_group, rarity, wear, quality, stattrak, collection
Segment key for the selected type. Use GET /cs2 to see all available keys in available_segments. Default: all
Examples: knife, Covert, fn, yes, normal
Start date. Supports multiple formats:
- ISO date: 2026-01-01 or 2026-01-01 10:00:00
- Unix timestamp: 1735689600
- Relative: -24hours, -7days, -30days, -1year
Default: 24 hours ago.
End date. Same formats as from. Default: now.
Maximum data points. Default: 1000, Max: 10000
Response format. Default: json. Available: csv, xml, html, gzip, zip, ndjson, mysql, mysql_with_table, pgsql, pgsql_with_table, mongo
Pretty-print JSON (set to 1 for json/gzip/zip formats). Default: 0
Response
Historical market data (single metric mode)
Changes
No recorded changes to this operation across all 1 revision of this API.