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.
| Field | Type | Meaning |
|---|---|---|
market_hash_name | string | The item. |
item_id | string | The item's Youpin template ID. |
filters | object | See Filters. |
sort | object | See Sorting. |
raw_response | boolean | false returns structured rows. Without it, data is Youpin's own JSON. |
{
"market_hash_name": "★ M9 Bayonet | Doppler (Factory New)",
"filters": { "phase": "Ruby" }
}Filters
| Filter | Type | Meaning |
|---|---|---|
phase | string | Ranks 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
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:
| Field | Type | Required | Description |
|---|---|---|---|
market | string | No | The marketplace: youpin, csfloat, or steam. |
operation | string | No | The operation that ran, such as listings. |
data | object | No | With 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. |
page | LivePage | null | No | Paging for the next request. null on operations that aren't paged. |
warnings | LiveRequestWarning[] | No | Notes about the request itself. Absent when there are none. |
response_time | string (date-time) | No | When cs2.sh sent the response (UTC). |
Response data
With raw_response: false, data.rankings[] holds one LiveFloatRanking per rank:
| Field | Description |
|---|---|
rank | The copy's position in the ranking, starting at 1. |
item | The copy as a LiveItem. The ranking gives market_hash_name, variant, float, paint_seed, and image_url, and the other fields are null. |
listing | The 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:
field | Choices | Needs an item |
|---|---|---|
filters.phase | The phases and gems Youpin ranks for the item | Yes |
sort | Lowest float first, or highest float first | No |
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
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
| Field | Type | Required | Description |
|---|---|---|---|
field | string | Yes | The request field to list choices for, such as filters.weapon or filters.stickers.entries[].name. |
contains | string | No | Text that a choice's label must contain, matched without regard to case. |
cursor | string | No | The 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:
| Field | Type | Required | Description |
|---|---|---|---|
market | string | No | The marketplace. |
operation | string | No | The data operation the choices apply to. |
field | string | No | The request field the choices are for. |
availability | string | No | Whether choices could be loaded for this request. |
completeness | string | No | complete when the list holds every accepted value. partial when it holds suggestions, and other values may also work. |
options | LiveOption[] | No | The choices. |
metadata | object | No | Information about the choice list, such as when it was fetched. |
page | LivePage | No | Paging for long choice lists. |
response_time | string (date-time) | No | When cs2.sh sent the response (UTC). |