# How to Backtest Steam Market Slippage

> cs2.sh stores full-depth Steam bid and ask orderbook snapshots from June 9, 2026, which lets a backtest replay a fixed quantity through every historical ask ladder.

The best ask prices only the first available level. A larger purchase may consume several levels, so its average fill price depends on the quantity offered at each price.

## Steam depth available for a slippage backtest

Each historical point contains `top` and `depth`. `top.ask` and `top.bid` are the best prices, while `top.ask_volume` and `top.bid_volume` are total order counts. The full ladders live in paired arrays: `depth.asks.prices[i]` matches `depth.asks.volumes[i]`, and the bid side uses the same layout.

Ask prices are ascending and bid prices are descending. Each `volumes` entry is the quantity at that exact level, not cumulative depth. Current books are available for all regular items; the history endpoint provides the latest full-depth observation selected inside each `1h` or `1d` bucket.

## How to calculate historical slippage

For each point, start at the first ask and consume `min(remaining quantity, level volume)` until the requested quantity is filled or the ladder ends. Divide total visible cost by filled units for the average fill price. Compare that average with `top.ask` to measure slippage, and retain any unfilled quantity rather than discarding a thin book.

Store `bucket`, `updated_at`, and `collected_at` with the calculation. `bucket` is the UTC grouping boundary, `updated_at` identifies the selected Steam observation, and `collected_at` records when cs2.sh collected it.

## Applicable endpoints

| Endpoint | Returns | Plans |
| --- | --- | --- |
| `GET /v1/market/steam/latest` | Current full-depth orderbooks for every regular item | All plans |
| `POST /v1/market/steam/history` | Historical full-depth snapshots since June 9, 2026 | Scale, Enterprise |

## Limits that affect the backtest

- Historical points are snapshots, not completed executions. Orders can be canceled between observation and submission.
- `1h` orderbook history is limited to 90 days; `1d` has no public maximum range.
- Variants are not supported on the Steam orderbook endpoints. A phase-specific name will not produce a book.
- The ladders are Steam wallet prices. Fees and any cash-value conversion are external assumptions.

The [Steam orderbook history guide](/resources/how-to-get-steam-orderbook-history) describes the snapshot timing in more detail.
