Steam Price Stream overview

SteamWebAPI Price Stream

Use the WebSocket price stream to keep a local Steam item price list current. Start from the item API, then apply updates for the items whose Steam price fields change. Each game with a scheduled Steam price update has its own channel.

For the browser quickstart and an interactive sample publication, see Steam Price Stream.

Access

You need a SteamWebAPI API key and an eligible active package. Free and Free+ are excluded. Send your API key in the X-Api-Key header when requesting a token. In browser applications, make this request from your own backend and return only the connection credentials to trusted users.

Request a connection token

curl --request POST 'https://www.steamwebapi.com/api/price-stream/token' \
  --header "X-Api-Key: $STEAMWEBAPI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"subscriptions":[{"source":"steam","games":["cs2","rust"]}]}'

Use the game short names from the item API. Omit games to request every active game for this source. An empty object requests every active Steam game and returns the channel list. Select up to 16 channels per connection. The steam source is available where the price stream is enabled. The markets source is reserved for future Marketplace price updates and currently returns HTTP 422.

Response field Meaning
websocket_url WebSocket address to pass to the SDK
token Connection credential valid for up to five minutes
expires_at Credential expiry as an ISO 8601 timestamp
channels Game channels the server subscribes this connection to automatically

Refresh by repeating the same request in your SDK's token callback. The server checks your current key and package again. To change the game selection, create a new connection with a token for that selection.

HTTP status What to do
400, 422 Check the JSON body, source and requested games
401 Check that the API key is valid and current
402, 403 Check the current package or account access
404 The stream is disabled on this deployment
429 Retry after the number of seconds in Retry-After
503 Retry with backoff

Maintain a local price list

  1. Register your publication handler and connect with the returned token. Wait for the server subscription event for each channel you consume.
  2. Start buffering publications before requesting the starting snapshot. For each subscribed game, read GET /steam/api/items?game=cs2&currency=USD&sort_by=name. Use select with id, markethashname and the Steam price fields listed below to keep the response small. If you need additional pages, increment page until the page is shorter than max.
  3. Index the snapshot by game and id, then apply buffered publications in the order they arrived. Upsert each item and replace its prices fields, including explicit null values. The stream can introduce a new item with its first Steam price. Use the item API for any catalog metadata you need for a new ID.
  4. On reconnect, continue with the recovered publications when the subscription reports successful recovery. For a fresh subscription or an unrecoverable gap, repeat the snapshot procedure. If your client loses its local state, start from a fresh snapshot even if its SDK can resume a position.

The SDK handles reconnect and bounded replay. Replay is limited to the latest 120 publications per channel and up to two minutes, with at most 60 publications recovered in one operation. Under higher traffic the effective window can be shorter. Keep a bounded buffer for your snapshot load. Start a new snapshot if the buffer overflows or continuity is lost again before the load completes.

This is a current-price feed. Several writes to the same item before publication may be combined into one update. Applying an identical update twice is safe. Reconcile any catalog removals or metadata changes through the item API.

Publication format

Field Meaning
version Message schema version, currently 1
event_id Opaque publication ID, stable for a retry of the same batch
source Price source, currently steam
game Game short name, such as cs2
currency USD
published_at UTC publication time
items Up to 100 current price records for changed items, bounded to 16 KiB per publication
items[].id Same item ID as in /steam/api/items
items[].markethashname Steam Market hash name, including variant when applicable
items[].prices Complete set of Steam price fields for that item

All amounts in prices are decimal strings with two fractional digits or null. REST amounts are JSON numbers. Normalize both to your preferred decimal representation before comparing them.

Price fields Meaning
pricelatest Current lowest Steam listing
buyorderprice, buyordermedian, buyorderavg Highest, median and average buy-order prices
pricelatestsell, pricelatestsell24h, pricelatestsell7d, pricelatestsell30d, pricelatestsell90d Latest sale prices
pricemedian, pricemedian24h, pricemedian7d, pricemedian30d, pricemedian90d Median sale prices
priceavg, priceavg24h, priceavg7d, priceavg30d, priceavg90d Average sale prices
pricesafe, pricemin, pricemax Steam reference price and sale range
lateststeamsellat Last sale timestamp as ISO 8601 or null
latest10steamsales Recent daily sale tuples [YYYY-MM-DD, decimal_price, volume] or null

Example publication for a newly priced item with order book data and no recorded sales:

{
  "version": 1,
  "event_id": "f0891579213c06f3520ea0034c28f5c8c3cc7d5fc34a8ed088a6f712ccb67a61",
  "source": "steam",
  "game": "cs2",
  "currency": "USD",
  "published_at": "2026-11-25T12:00:01+00:00",
  "items": [
    {
      "id": "5be9d3a1",
      "markethashname": "Example Item",
      "prices": {
        "pricelatest": "12.34",
        "pricelatestsell": null,
        "pricelatestsell24h": null,
        "pricelatestsell7d": null,
        "pricelatestsell30d": null,
        "pricelatestsell90d": null,
        "pricemedian": null,
        "pricemedian24h": null,
        "pricemedian7d": null,
        "pricemedian30d": null,
        "pricemedian90d": null,
        "priceavg": null,
        "priceavg24h": null,
        "priceavg7d": null,
        "priceavg30d": null,
        "priceavg90d": null,
        "pricesafe": null,
        "pricemin": null,
        "pricemax": null,
        "buyorderprice": "11.75",
        "buyordermedian": "11.20",
        "buyorderavg": "11.25",
        "lateststeamsellat": null,
        "latest10steamsales": null
      }
    }
  ]
}

The Steam channel does not include inventory, assets, third-party prices or the mixed-source pricemix field. For Marketplace price snapshots use GET /markets/prices or GET /market/{market}/prices.

Node.js subscriber

Run with Node.js 22 or later. Install the official SDK with npm install centrifuge. Set STEAMWEBAPI_API_KEY and save this as subscribe.mjs. The example prints the subscription state and incoming batches. Use the snapshot procedure above when integrating with your own price store.

import { Centrifuge, UnauthorizedError } from 'centrifuge';

const apiKey = process.env.STEAMWEBAPI_API_KEY;
if (!apiKey) throw new Error('Set STEAMWEBAPI_API_KEY.');

async function credentials() {
  const response = await fetch('https://www.steamwebapi.com/api/price-stream/token', {
    method: 'POST',
    headers: { 'X-Api-Key': apiKey, 'Content-Type': 'application/json' },
    body: JSON.stringify({ subscriptions: [{ source: 'steam', games: ['cs2'] }] }),
    signal: AbortSignal.timeout(10_000),
  });
  if ([401, 402, 403, 404, 422].includes(response.status)) throw new UnauthorizedError();
  if (response.status === 429) {
    const delay = Number(response.headers.get('Retry-After')) || 1;
    await new Promise((resolve) => setTimeout(resolve, delay * 1000));
  }
  if (!response.ok) throw new Error(`Token request failed (${response.status}).`);
  return response.json();
}

const initial = await credentials();
const client = new Centrifuge(initial.websocket_url, {
  token: initial.token,
  getToken: async () => (await credentials()).token,
});
client.on('subscribed', ({ channel, recovered }) => {
  console.log(channel, recovered ? 'Recovered' : 'Load a snapshot');
});
client.on('publication', ({ channel, data }) => console.log(channel, data));
client.on('error', ({ error }) => console.error(error.message));
client.connect();

Python subscriber

Install the official SDK and an asynchronous HTTP client with python -m pip install centrifuge-python httpx. Set STEAMWEBAPI_API_KEY and run the script with Python 3.10 or later.

import asyncio
import os

import httpx
from centrifuge import Client, ClientEventHandler, UnauthorizedError


class Events(ClientEventHandler):
    async def on_subscribed(self, ctx):
        print(ctx.channel, "Recovered" if ctx.recovered else "Load a snapshot")

    async def on_publication(self, ctx):
        print(ctx.channel, ctx.pub.data)


async def main():
    async with httpx.AsyncClient(timeout=10) as http:
        async def credentials():
            response = await http.post(
                "https://www.steamwebapi.com/api/price-stream/token",
                headers={"X-Api-Key": os.environ["STEAMWEBAPI_API_KEY"]},
                json={"subscriptions": [{"source": "steam", "games": ["cs2"]}]},
            )
            if response.status_code in {401, 402, 403, 404, 422}:
                raise UnauthorizedError()
            if response.status_code == 429:
                await asyncio.sleep(int(response.headers.get("Retry-After", "1")))
            response.raise_for_status()
            return response.json()

        async def refresh():
            return (await credentials())["token"]

        initial = await credentials()
        client = Client(
            initial["websocket_url"],
            token=initial["token"],
            get_token=refresh,
            events=Events(),
        )
        await client.connect()
        try:
            await asyncio.Event().wait()
        finally:
            await client.disconnect()


if __name__ == "__main__":
    asyncio.run(main())

MCP discovery

In the SteamWebAPI MCP server, search for price stream or use get_endpoint with path /api/price-stream/token and method post. Read this guide as docs://markdown/price-stream.md. The generated integration runs in your application. The MCP read-only endpoint tester continues to handle REST GET requests.