New: live data for Youpin, CSFloat, and Steam

POST /v1/live/youpin/listings

Returns the current Youpin listings for one item, each with its price, float, paint seed, phase or tier, stickers, and seller.

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 listings 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. A phase or tier in the name returns only that variant.
item_idstringThe item's Youpin template ID.
listing_typestringbuy_now, rental, auction, or pre_sale. See Listing types. Without it, the request returns buy now listings.
filtersobjectSee Filters.
sortobjectSee Sorting.
raw_responsebooleanfalse returns structured rows. Without it, data is Youpin's own JSON.
{
  "market_hash_name": "AK-47 | Redline (Field-Tested)",
  "filters": { "max_float": 0.2, "max_price": 300 },
  "sort": { "field": "price" }
}

Filters#

Every filter is optional. Buy now listings take all of these except the rent and deposit filters.

FilterTypeMeaning
min_price, max_pricenumberThe listing price in CNY, inclusive.
min_float, max_floatnumberThe float, from 0 to 1, inclusive. Either can be sent alone.
min_fade, max_fadenumberThe fade percentage, from 0 to 100, for items that have one.
paint_seedsinteger[]The paint seed. Youpin takes exactly one per request.
phasestringA Doppler phase or gem the item has, such as Phase 2 or Ruby.
tierstringA tier the item has, such as Tier 1. You can't send it with phase.
stickersobjectStickers on the item. See Stickers, patches, and charms.
patchesobjectPatches on the item.
charmsobjectWhether a charm is attached.
has_name_tagbooleanWhether the item has a name tag.
charm_patternintegerCharm items only. The exact pattern of the charm.
min_charm_pattern, max_charm_patternintegerCharm items only. A pattern range. Send both.
pattern_presetstringCharm items only. One of Youpin's named pattern groups for the item.
fast_deliverytrueOnly listings Youpin marks for fast delivery.
group_identicalbooleanYoupin merges identical listings into one row.
min_short_daily_rent, max_short_daily_rentnumberRentals only. The short-term rent in CNY per day.
min_long_daily_rent, max_long_daily_rentnumberRentals only. The long-term rent in CNY per day. A maximum needs a minimum above 0.
min_deposit, max_depositnumberRentals only. The deposit in CNY.

The other listing types take fewer filters:

listing_typeFilters
rentalEverything buy now takes except min_price, max_price, and group_identical, plus the rent and deposit filters.
auctionmin_price, max_price, min_float, max_float, paint_seeds, has_name_tag, charms, and stickers by name only.
pre_salemin_price, max_price, min_float, max_float, paint_seeds, phase, has_name_tag, charms, and stickers by presence only.

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.

Stickers, patches, and charms#

filters.stickers takes one of three forms:

FormMeaning
entriesUp to 5 stickers, each by name, such as Sticker | Crown (Foil), or by category. The listing must have all of them.
presetOne of Youpin's sticker sets: four_holo, four_foil, four_gold, four_shining, five_holographic, five_gold_sticker, five_bright, or five_shining.
presencepresent for any sticker, absent for none.

An entry can have a count, the number of copies of that sticker, or a slot from 0 to 4, its position, but not both. Give a slot on every entry or on none. "unscraped": true requires every sticker on the item to be unscraped.

A preset matches four or five stickers of that finish, not necessarily the same sticker.

filters.patches takes presence, or up to 5 entries by name with an optional count. filters.charms takes only presence, because Youpin can't filter by which charm is attached.

{
  "market_hash_name": "AK-47 | Redline (Field-Tested)",
  "filters": {
    "stickers": { "entries": [{ "name": "Sticker | Crown (Foil)", "slot": 0 }] },
    "charms": { "presence": "absent" }
  }
}

Sorting#

sort.direction reverses a field's default direction. Without sort, listings come in Youpin's default order.

listing_typesort.field
buy_nowprice, float, charm_pattern (ascending by default), created_at and heat (descending only)
rentalshort_daily_rent, long_daily_rent, deposit, float (ascending by default), heat (descending only)
auctionbid_count (descending by default), expires_at (ascending by default)
pre_saleprice, float, delivery_time, compensation (ascending by default)

heat is Youpin's popularity order. charm_pattern needs a charm item, and not every item offers float for rentals. A sort the item doesn't have returns 400.

Request#

POSTapi.cs2.sh/v1/live/youpin/listings
curl -X POST https://api.cs2.sh/v1/live/youpin/listings \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "market_hash_name": "AK-47 | Redline (Field-Tested)",
  "filters": {
    "max_float": 0.2,
    "max_price": 300
  },
  "sort": {
    "field": "price"
  },
  "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.listings[] holds one LiveListing per listing:

FieldDescription
idThe listing ID.
listing_typebuy_now, rental, auction, or pre_sale.
price, currencyThe price in CNY, or null for a rental.
seller_idThe seller's Youpin user ID.
itemThe item as a LiveItem: market_hash_name, variant, float, paint_seed, paint_index, stickers[], charms[], patches[], name_tag, and more.
rentalRentals only: short_daily_rent, long_daily_rent, deposit, max_days.
auctionAuctions only: starting_price, current_bid, buyout_price, bid_count, expires_at.
pre_salePre-sales only: delivery_time, compensation.
detail_queryThe listing detail request for this listing.
store_queryThe store request for its seller.

Notes#

A listing row is Youpin's short form of the item. Its detail_query returns the full listing.

Auction rows have no listing detail, so their detail_query is null. Their id is the auction's ID, and their sticker slot is null. An auction's price is the higher of its starting price and its current bid, and its buyout is auction.buyout_price.

A rental gives daily rates, and cs2.sh doesn't compute a total for a rental length.

pre_sale.delivery_time is in UTC. Youpin shows it in China time without a year, so cs2.sh takes the year closest to now.

The last page can be short, or empty.

Errors#

A request returns 400 with details.code set to unknown_value when the name isn't in the schema, or the item doesn't have the phase, tier, or preset you sent. details.allowed_values lists the item's values when cs2.sh knows them. Other errors are the shared live errors.

POST /v1/live/youpin/listings/options#

Returns the valid choices for one field of a listings request. These fields have choices:

fieldChoicesNeeds an item
filters.phase, filters.tierThe phases, gems, or tiers the item hasYes
filters.pattern_presetThe pattern groups Youpin offers for a charm itemYes
filters.stickers.entries[].nameSticker namesNo
filters.stickers.entries[].categorySticker categoriesNo
filters.stickers.presetThe sticker sets the item hasYes
filters.patches.entries[].namePatch namesYes
sortThe sorts availableNo
listing_typeThe listing typesNo

To get one listing type's choices, send listing_type with field. Each option's query is a complete listings request with the choice applied, and a sticker choice is added to the stickers already in your request.

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

Sticker name choices are suggestions, so completeness is partial. Youpin matches a sticker by its full English name, including names that aren't in the list.

Request#

POSTapi.cs2.sh/v1/live/youpin/listings/options
curl -X POST https://api.cs2.sh/v1/live/youpin/listings/options \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "market_hash_name": "★ Karambit | 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).