Developer API

CS2 Marketindex API

Track the aggregate CS2 market — current index value, full history, and side-by-side comparison across every marketplace we cover.

Endpoints

All endpoints return JSON, accept the same auth header, and degrade with a normalised error envelope.

GET /steam/api/market-index/cs2
GET /steam/api/market-index/cs2/history
GET /steam/api/market-index/cs2/compare

CS2 Marketindex API — quickstart

Same auth header as every other endpoint we ship. Get an API key from the dashboard and you're querying inside two minutes.

  • Single auth header, JSON response.
  • Rate limits scale with your plan tier.
  • Full schema in the API reference.
API Request
# curl with API key
curl "https://www.steamwebapi.com/steam/api/market-index/cs2?key=$KEY"
# PHP
$res = file_get_contents('https://www.steamwebapi.com/steam/api/market-index/cs2?key=' . $KEY);
$data = json_decode($res, true);
# Node.js
const r = await fetch(`https://www.steamwebapi.com/steam/api/market-index/cs2?key=${KEY}`);
const data = await r.json();

About this API

The Marketindex API computes a weighted index across the CS2 economy: a single number that captures whether the market is up or down. Use it as a benchmark for portfolio performance, a market-state input for trading bots, or a chart on a community dashboard.

Three endpoints: current value, time series history, and per-marketplace comparison. Same auth header, same DTO style.

FAQ

How is the index calculated?

Volume-weighted average of the top liquid CS2 items, rebalanced periodically. Snapshot-based so historical comparisons stay consistent.

Can I see history?

Yes — /steam/api/market-index/cs2/history returns the index as a time series.

Can I compare marketplaces?

Yes — /steam/api/market-index/cs2/compare returns the per-marketplace index side by side.

Start building with the CS2 Marketindex API

One key, every Steam endpoint.