New: live data for Youpin, CSFloat, and Steam

GET /health

Returns current health for marketplace sources, variant prices, public endpoint datasets, the item schema, and aggregate database counts.

No API key needed.

Once health data is ready, the endpoint returns HTTP 200 even when the JSON status is degraded or down. HTTP 503 means the health snapshot itself is not ready.

Request#

GETapi.cs2.sh/health
curl https://api.cs2.sh/health \
  -H "Accept-Encoding: gzip" --compressed

Response#

{
  "status": "up",
  "last_refreshed_at": "string",
  "schema_ready": false,
  "sources": null,
  "variants": null,
  "endpoints": null,
  "stats": {
    "total_events": 0,
    "market_hash_names": 0,
    "variant_items": 0
  }
}

Response fields#

HealthResponse fields:

FieldTypeRequiredDescription
statusstringYesAllowed: up, degraded, down. Overall API data health.
last_refreshed_atstring (date-time)YesWhen this health snapshot was generated.
schema_readybooleanYesWhether the item schema is available.
sourcesRecord<string, HealthEntry>YesMarketplace health keyed by source.
variantsRecord<string, HealthEntry>YesVariant-price health keyed by source collector.
endpointsRecord<string, HealthEntry>YesDataset health keyed by endpoint name. fx reports the exchange rates used for currency conversion.
statsHealthStatsYesAggregate database counts at the last health refresh.

Health entries#

Entries under sources, variants, and endpoints contain updated_at, collected_at, and status. Status is up, degraded, or down based on that dataset's expected refresh rate.

endpoints.fx covers the exchange rates behind currency conversion. It is degraded when the rates are more than 2 hours old.

endpoints has live/youpin, live/csfloat, and live/steam entries, which show whether live requests to each marketplace are working. They don't affect the top-level status.

schema_ready tells you whether GET /v1/schema is available. stats contains total_events, market_hash_names, and variant_items.

Full schemas: HealthEntry and HealthStats.