How to Backfill CS2 Price Data Without Gaps

Updated

API reference: POST /v1/prices/history · POST /v1/archive/history

Backfill CS2 price data by requesting adjacent UTC ranges from POST /v1/prices/history, storing the returned normalized boundaries, and preserving hours where a source has no observation.

Two kinds of gaps need different treatment. A request gap means part of the intended date range was never queried. An observation gap means the range was queried but the selected marketplace returned no data in that bucket. Only the first is a backfill failure.

Historical coverage available for a backfill#

POST /v1/prices/history contains continuously recorded marketplace quote OHLC since December 24, 2025. It supports all six sources, although field coverage differs: Skinport is ask-only, CSFloat bid history begins July 18, 2026, and CSFloat and C5Game do not carry bid_volume.

Interval Maximum range per request
5m 14 days
30m 90 days
1h 365 days
1d Unlimited

Each source object includes OHLC prices, last-observed volumes, sample_count, and actual open_time and close_time. The top-level bucket is the aligned UTC boundary, not the time of the first observation.

For earlier coverage, POST /v1/archive/history provides 1h and 1d archive rows from 2023. That archive has a different data model: last-observed prices and order volumes, plus hourly_volume and total_supply on the aggregate source. It should remain a labeled series instead of being silently spliced into OHLC.

How to plan adjacent requests#

Choose one interval, source set, and exact list of market_hash_name values. Split the desired range at UTC interval boundaries so the next request starts at the prior response's effective end. Persist the response's normalized start, end, and interval with each chunk, then deduplicate by item, source, and bucket.

Both history endpoints accept up to 100 items per request and can return successful items beside item-level errors[]. Process the successful items map even when errors are present, and retry only request-wide transient failures.

Applicable endpoints#

Endpoint Returns Plans
POST /v1/prices/history Quote OHLC from December 24, 2025; CSFloat bids from July 18, 2026 Scale, Enterprise
POST /v1/archive/history Long-term prices, supply, and sale volume from 2023 Scale, Enterprise

Gap rules#

  • A valid item with no OHLC buckets in a requested range is omitted from items. Keep that interval missing; zero-fill would create a nonexistent price.
  • Forward-filling converts observations into a derived last-known series. Label and store that derived series separately if the application needs it.
  • A 1h OHLC request cannot exceed 365 days even though 1d is unlimited. Chunking does not extend the history start date.
  • Archive history updates once or twice per day, so a just-finished archive bucket may not be complete when the backfill runs.

The multi-year history guide covers the archive fields that should remain distinct from current-price OHLC.