How to Batch CS2 Price API Requests

Updated

API reference: GET /v1/prices/latest · GET /v1/schema

For bulk current prices, download GET /v1/prices/latest once and partition its items map locally. For historical endpoints, submit exact names in chunks of at most 100.

The current snapshot already contains every tracked item and all six marketplaces, so many selected-item requests would produce different response times without improving coverage. One snapshot gives the batch a common response_time.

Data and limits for bulk processing#

  • GET /v1/schema supplies the canonical market_hash_name keys accepted across price, history, archive, and liquidity data.
  • GET /v1/prices/latest returns the complete current-price snapshot in one large response. It requires Accept-Encoding: gzip.
  • POST history and archive endpoints accept up to 100 items and request bodies up to 1 MiB.
  • All plans include unlimited requests with a rate limit of 10 requests per second per user.
  • POST endpoints can return successful items beside per-item errors[], so partial success must remain attached to each chunk.

How to organize a batch#

For current prices, fetch the full snapshot, validate currency and items, and select the required names from the returned map. Keep the snapshot's response_time and each source's collected_at; they answer different freshness questions.

For a history or archive job, deduplicate exact names, split them into chunks of no more than 100, and retain every chunk's normalized start, end, and interval. Merge results by exact item key and keep errors[] instead of converting unresolved names into zero prices.

Use bounded retries for request-wide 429 and 5xx failures. An item-level unknown_item or invalid_format needs a corrected schema name, not an unchanged retry.

Applicable endpoints#

Endpoint Returns Plans
GET /v1/prices/latest One current all-item, all-source snapshot All plans
GET /v1/schema Exact item names and catalog metadata All plans

Batch boundaries#

  • Separate current snapshots fetched at different times are not an atomic market view. Prefer one download when comparisons need a common response time.
  • A missing or null source field is missing data. Never replace it with zero during a merge.
  • The full current snapshot is large. Stream, cache, or filter it after gzip decompression when memory is constrained.
  • Endpoint-specific history starts and interval limits still apply to every chunk; dividing a request cannot extend coverage.

See the current snapshot cache guide for repeated bulk reads.