New: live data for Youpin, CSFloat, and Steam

POST /v1/live/youpin/float_rank

Returns Youpin's float ranking for one item: the lowest-float or highest-float copies Youpin knows of, in rank order, whether or not they're for sale.

Available on all plans, at 6 requests per minute on Developer and 36 on Scale. Each request is for one item, with up to 20 ranks per page.

Prices are in CNY and aren't converted. Data is real-time.

Inputs#

Send exactly one of market_hash_name and item_id. Everything else is optional.

FieldTypeMeaning
market_hash_namestringThe item.
item_idstringThe item's Youpin template ID.
filtersobjectSee Filters.
sortobjectSee Sorting.
raw_responsebooleanfalse returns structured rows. Without it, data is Youpin's own JSON.
{
  "market_hash_name": "★ M9 Bayonet | Doppler (Factory New)",
  "filters": { "phase": "Ruby" }
}

Filters#

FilterTypeMeaning
phasestringRanks only one Doppler phase or gem, such as Phase 4 or Ruby.

weapon, finish, wear, and quality are accepted, but cs2.sh only checks them against the item, and a mismatch returns 400.

Youpin's own request parameters go in market_parameters.

Sorting#

The only sort field is float, ascending by default. "direction": "desc" ranks the highest float first.

Request#

POSTapi.cs2.sh/v1/live/youpin/float_rank
curl -X POST https://api.cs2.sh/v1/live/youpin/float_rank \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "market_hash_name": "★ M9 Bayonet | Doppler (Factory New)",
  "filters": {
    "phase": "Ruby"
  },
  "raw_response": false
}'

Response#

{
  "market": "string",
  "operation": "string",
  "data": null,
  "page": {
    "page_size": 0,
    "has_next": false,
    "next_cursor": "string",
    "cursor_expires_at": "string",
    "total_count": 0,
    "total_exact": false
  },
  "warnings": [
    {
      "code": "string",
      "field": "string",
      "message": "string"
    }
  ],
  "response_time": "string"
}

Response fields#

LiveResponse fields:

FieldTypeRequiredDescription
marketstringNoThe marketplace: youpin, csfloat, or steam.
operationstringNoThe operation that ran, such as listings.
dataobjectNoWith raw_response: true, the default, the marketplace's own JSON, unchanged. With raw_response: false, the operation's structured object, which is one of LiveListingsData, LiveListingDetailData, LiveBuyOrdersData, SteamBuyOrderBook, LiveFloatRankData, or LiveSearchData.
pageLivePage | nullNoPaging for the next request. null on operations that aren't paged.
warningsLiveRequestWarning[]NoNotes about the request itself. Absent when there are none.
response_timestring (date-time)NoWhen cs2.sh sent the response (UTC).

Response data#

With raw_response: false, data.rankings[] holds one LiveFloatRanking per rank:

FieldDescription
rankThe copy's position in the ranking, starting at 1.
itemThe copy as a LiveItem. The ranking gives market_hash_name, variant, float, paint_seed, and image_url, and the other fields are null.
listingThe copy's listing, with its id, price, currency, and the detail_query for its listing detail. null when the copy isn't for sale.

Notes#

Youpin builds the ranking from its own and third-party data, so it includes copies that aren't listed.

Each row names its copy in item.market_hash_name, wear included, and it can differ from the name you sent.

The ranking has no stickers, charms, or seller. For a copy that's for sale, the row's listing.detail_query returns them.

Errors#

A filters.phase that Youpin doesn't rank for the item returns 400. The options path lists the phases it ranks. Other errors are the shared live errors.

POST /v1/live/youpin/float_rank/options#

Returns the valid choices for one field of a float rank request. Two fields have choices:

fieldChoicesNeeds an item
filters.phaseThe phases and gems Youpin ranks for the itemYes
sortLowest float first, or highest float firstNo

Each option's query is a complete float rank request with the choice applied.

{
  "market_hash_name": "★ M9 Bayonet | Doppler (Factory New)",
  "field": "filters.phase"
}

Request#

POSTapi.cs2.sh/v1/live/youpin/float_rank/options
curl -X POST https://api.cs2.sh/v1/live/youpin/float_rank/options \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "market_hash_name": "★ M9 Bayonet | Doppler (Factory New)",
  "field": "filters.phase"
}'

Parameters#

FieldTypeRequiredDescription
fieldstringYesThe request field to list choices for, such as filters.weapon or filters.stickers.entries[].name.
containsstringNoText that a choice's label must contain, matched without regard to case.
cursorstringNoThe page.next_cursor from the previous page of choices, sent as the only field.

Response#

{
  "market": "string",
  "operation": "string",
  "field": "string",
  "availability": "string",
  "completeness": "string",
  "options": [
    {
      "label": "string",
      "query": {
        "path": "string",
        "body": null
      }
    }
  ],
  "metadata": null,
  "page": {
    "page_size": 0,
    "has_next": false,
    "next_cursor": "string",
    "cursor_expires_at": "string",
    "total_count": 0,
    "total_exact": false
  },
  "response_time": "string"
}

Response fields#

LiveOptionsResponse fields:

FieldTypeRequiredDescription
marketstringNoThe marketplace.
operationstringNoThe data operation the choices apply to.
fieldstringNoThe request field the choices are for.
availabilitystringNoWhether choices could be loaded for this request.
completenessstringNocomplete when the list holds every accepted value. partial when it holds suggestions, and other values may also work.
optionsLiveOption[]NoThe choices.
metadataobjectNoInformation about the choice list, such as when it was fetched.
pageLivePageNoPaging for long choice lists.
response_timestring (date-time)NoWhen cs2.sh sent the response (UTC).