New: live data for Youpin, CSFloat, and Steam

POST /v1/live/youpin/buy_orders

Returns the open Youpin buy orders for one item, each with its price, its quantity, and the conditions it puts on the item, such as a float range, a phase, or a fade range.

Available on all plans, at 4 requests per minute on Developer and 20 on Scale. Each request is for one item, with up to 100 orders 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.
raw_responsebooleanfalse returns structured rows. Without it, data is Youpin's own JSON.
{
  "market_hash_name": "AWP | Asiimov (Field-Tested)"
}

Buy orders have no listing types and no sorting, and come back in Youpin's order.

Filters#

FilterTypeMeaning
min_float, max_floatnumberOrders whose float condition is exactly this range, from 0 to 1. Send both.
fade_bucketobjectOrders for exactly this fade range, as min and max from 0 to 100. The range must be one Youpin offers for the item.
phasestringOrders for one Doppler phase or gem, such as Ruby. The response can also include orders that accept any phase.

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.

Request#

POSTapi.cs2.sh/v1/live/youpin/buy_orders
curl -X POST https://api.cs2.sh/v1/live/youpin/buy_orders \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "market_hash_name": "AWP | Asiimov (Field-Tested)",
  "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.buy_orders[] holds one LiveBuyOrder per order:

FieldDescription
idThe order ID.
price, currencyWhat the buyer pays per item, in CNY.
quantityHow many the buyer wants.
market_hash_nameThe item the order is for.
conditionsWhat the order requires of the item: min_float and max_float, min_fade and max_fade, or variant. null means the order takes any copy of the item.
created_atWhen the buyer placed the order.

An order with conditions set to {} and an unmapped_condition entry in data.warnings has a condition cs2.sh couldn't read. Treat it as a restricted order, not one that takes any copy.

In a phase request, an order that accepts any phase has no variant in its conditions.

Float filters match exact ranges#

min_float and max_float return the orders whose float condition is exactly that range, not every order that would accept a float in it. An order that accepts floats from 0.06 to 0.07 is returned for this request:

{
  "market_hash_name": "AK-47 | Red Laminate (Factory New)",
  "filters": { "min_float": 0.06, "max_float": 0.07 }
}

It isn't returned for 0.063 to 0.067, even though that range sits inside it. A float filter can also leave out orders with no float condition.

On CSFloat, a float range returns every order that would accept it. The float ranges buyers use on an item come from the options path below, or from each order's conditions in a request without a float filter.

Errors#

A request returns 400 when it sends only one of min_float and max_float, or a fade_bucket that Youpin doesn't offer for the item. Other errors are the shared live errors.

POST /v1/live/youpin/buy_orders/options#

Returns the valid choices for one field of a buy orders request. Every field needs an item:

fieldChoices
filters.min_float, filters.max_floatThe float ranges Youpin suggests for the item, as pairs
filters.fade_bucketThe fade ranges Youpin offers for the item
filters.phaseThe phases and gems the item has

Each option's query is a complete buy orders request with the choice applied.

{
  "market_hash_name": "AK-47 | Red Laminate (Factory New)",
  "field": "filters.min_float"
}

The float ranges are suggestions, so completeness is partial. Any valid pair works, and some items have no suggestions. The listed fade ranges are the only ones the filter accepts.

Request#

POSTapi.cs2.sh/v1/live/youpin/buy_orders/options
curl -X POST https://api.cs2.sh/v1/live/youpin/buy_orders/options \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "market_hash_name": "AK-47 | Red Laminate (Factory New)",
  "field": "filters.min_float"
}'

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).