New: live data for Youpin, CSFloat, and Steam

Live listings, buy orders, & more

Live endpoints fetch real-time data from Youpin, CSFloat, and Steam: listings with float, paint seed, and stickers, buy orders, seller stores, and market search. Each request covers one item, listing, seller, or search on one marketplace. For prices across many items, use prices, which returns every item on six marketplaces, refreshed every ~5 minutes.

POST /v1/live/csfloat/listings
Content-Type: application/json

{
  "market_hash_name": "AK-47 | Redline (Field-Tested)",
  "filters": { "max_float": 0.2, "max_price": 50 },
  "sort": { "field": "price" }
}

Every plan includes live, and so does a demo key.

Operations#

Each operation has its own path, POST /v1/live/{market}/{operation}.

OperationReturnsYoupinCSFloatSteam
listingsListings for one itemYesYesYes
searchItems matching text or filtersYesThrough listingsYes
buy_ordersBuy orders for one itemYesYesYes
float_rankThe marketplace's float ranking for one itemYes--
listing_detailOne listing, by its IDYesYesIn listings
storeOne seller's listingsYesYes-

CSFloat has no separate search operation. A CSFloat listings request without market_hash_name searches the whole market by filters. Steam has no separate listing_detail operation, because every Steam listings row already has the listing's full detail.

Each operation also has POST /v1/live/{market}/{operation}/options, which lists the valid choices for one request field. GET /v1/live/capabilities returns the JSON schema of every live request and response.

In a structured response, rows carry the follow-up request:

RowFieldRequest it holds
Search itemlistings_queryThat item's listings
Listingdetail_queryThat listing's listing_detail
Listingstore_queryIts seller's store

Each holds a path and a body to POST unchanged. A null means the marketplace has no such request, as with detail_query and store_query on Steam rows.

Requests#

The request body is one JSON object. The path names the marketplace and operation, and the body never does.

FieldTypeMeaning
market_hash_namestringThe item, by the same name every other endpoint uses.
item_idstringThe marketplace's own item ID, such as a Youpin template ID or a Steam group ID. Send it instead of market_hash_name, never with it.
searchstringText for the marketplace's text search, on the operations that have one.
seller_idstringThe seller, for store.
listingobjectThe listing, for listing_detail, in listing.listing_id.
listing_typestringbuy_now, auction, rental, or pre_sale, where the marketplace has them. Without it, the request reads buy_now listings.
filtersobjectReadable filters, such as price, float, paint seed, phase, and stickers.
sortobjectfield and an optional direction, asc or desc.
market_parametersobjectThe marketplace's own request parameters, for controls with no readable filter. See Filters and sorting.
raw_responsebooleantrue returns the marketplace's own JSON, and false returns structured rows. Without it, the response is raw.
cursorstringThe next page, sent as the only field. See Paging.

A field the operation doesn't take returns 400 instead of being ignored.

A Doppler phase or another variant goes in the name, as in ★ Karambit | Doppler (Factory New) | Phase 4, the same name that variants carry on the price endpoints.

Numbers can be JSON numbers or numeric strings. IDs are always strings.

Requests take no page size or offset, and can't be batched.

Filters and sorting#

cs2.sh sends filters to the marketplace with the request and doesn't remove rows afterward, so a filter means what the marketplace means by it.

Filters combine with AND. A filter that takes a list matches any value in it, so "weapon": ["AK-47", "M4A1-S"] returns both. Every range is inclusive:

RangeUnit
min_float, max_floatFloat, from 0 to 1
min_fade, max_fadeFade percentage
min_price, max_priceThe marketplace's currency

A full item name already fixes the weapon, finish, wear, and quality.

Stickers, patches, and charms use one shape on every marketplace:

{
  "market_hash_name": "AK-47 | Redline (Field-Tested)",
  "filters": {
    "stickers": {
      "entries": [{ "name": "Sticker | Crown (Foil)", "count": 2 }]
    }
  }
}

Without a slot, a sticker matches in any position. Several entries combine differently per marketplace:

MarketplaceSeveral entriescount and slot
YoupinThe listing must have all of themBoth supported for stickers
CSFloatThe listing must have all of themBoth supported for stickers and patches
SteamThe listing must have any of them. Send "match": "any" with more than one entry.Not supported

Without sort.direction, price, float, and other numeric fields sort ascending, and created_at, best_deal, discount, bid_count, heat, and ranking sort descending. Without sort, rows come in the marketplace's default order.

market_parameters takes the marketplace's own request parameters under the marketplace's own names, and only those that capabilities lists for the operation. Sending the same control as both a filter and a parameter returns 400.

Filter options#

Filters such as sticker names, collections, and phases accept only values the marketplace knows, and the options path lists them. Send the field and as much of the request as you have:

POST /v1/live/csfloat/listings/options
Content-Type: application/json

{
  "market_hash_name": "AK-47 | Redline (Field-Tested)",
  "field": "filters.stickers.entries[].name",
  "contains": "Crown"
}
FieldMeaning
fieldRequired. The request field to list choices for, as a path, such as filters.weapon, filters.stickers.entries[].name, sort, or listing_type.
containsOptional. Keeps only labels that contain this text, ignoring case.
Anything elseThe rest of the request, such as the item, listing type, and filters. Some choices depend on the item.

The response is a LiveOptionsResponse. Each entry in options has a display label and a query whose body, POSTed to its path, runs your request with that choice applied. Take the value from query.body, not from label.

completeness is complete when the list holds every valid value, and partial when it holds suggestions and other values can be valid. Long lists are paged like data.

A free-input field, such as a price or a float bound, has no choices and returns 400 with details.code set to free_input_field and the field's constraints. An unknown field returns 400 with details.code set to unsupported_filter, and details.allowed_values lists the operation's fields that have choices.

Options requests aren't data requests. They have their own limit and don't use a demo key's live requests.

Raw and structured responses#

Every live response is a LiveResponse:

FieldMeaning
market, operationThe marketplace and operation you requested.
dataThe result, shaped by raw_response.
pagePaging state, or null when the operation isn't paged.
response_timeWhen cs2.sh generated the response.
warningsNotes about the request, present only when there are any.

By default, with raw_response: true, data is the marketplace's own JSON exactly as it responded. Its shape differs by marketplace and changes when the marketplace changes it.

With raw_response: false, data has one shape per operation, the same on every marketplace:

Operationdata
listings, storelistings[] of LiveListing
listing_detaillisting, one LiveListing
buy_ordersbuy_orders[] of LiveBuyOrder. Steam returns its orderbook instead: SteamBuyOrderBook.
float_rankrankings[] of LiveFloatRanking
searchitems[] of LiveSearchItem

In structured rows, prices are numbers in the marketplace's currency, and every row with a price has its own currency. Times are RFC 3339 in UTC. IDs are strings, because CSFloat IDs are too large for a JSON number.

item is a LiveItem. Its market_hash_name is the item name without a variant, and item.variant is the phase, gem, or tier, such as Phase 2, Ruby, or Tier 1.

A null means the marketplace didn't report the value, and [] means it reported none.

Auction, rental, and pre-sale listings carry an auction, rental, or pre_sale object with their terms. A rental listing's price is null, because its rates are in rental.

data.warnings lists each value cs2.sh couldn't map, with the row's index, the field, and a code: unparsed_value, unknown_currency, unknown_variant, unmapped_condition, or unmapped_row. A row cs2.sh can't map at all is left out and reported as unmapped_row.

If cs2.sh can't map the marketplace's response, the request returns 502 with details.reason set to structure_unavailable. Send it again with raw_response: true instead of waiting.

Paging#

Page sizes are fixed, and the marketplace can return fewer rows than a full page.

MarketplacePage sizes
Youpinlistings, search, and float_rank: 20. buy_orders and store: 100.
CSFloatlistings and store: 50.
Steamlistings: 20 for an item, 30 without one. search: 30.

listing_detail on every marketplace, and buy_orders on CSFloat and Steam, aren't paged. Every paged response has a LivePage in page.

When page.next_cursor isn't null, send it to the same path as the only field:

{ "cursor": "<page.next_cursor>" }

The cursor carries the whole original request, including raw_response, and works only on the path that returned it.

A cursor expires 15 minutes after the first page, at page.cursor_expires_at, and reading more pages doesn't extend it. An expired cursor returns 400 with details.code set to cursor_expired.

Each page is one request against your limit.

page.total_count is null when the marketplace gives no total, and page.total_exact is false when its total isn't reliable. To read every row, page until next_cursor is null.

Currency#

cs2.sh never converts live prices, and live requests have no currency parameter.

MarketplaceCurrency
YoupinCNY
CSFloatUSD
SteamUSD, as the total the buyer pays with Steam's fee included

A Steam listings request without an item can return rows in other currencies, so check each row's currency.

Price filters and price sorting use the same currency. To convert, use the rates from GET /v1/fx.

Limits#

Live has per-minute limits instead of the 10 requests per second on the other endpoints. Each operation has its own limit, shared by every key on your account, and the options paths of one marketplace share one more. The numbers for every plan are under Live limits.

Demo keys#

A demo key gets 100 live data requests for its lifetime instead of the plan limits. A request that never reaches the marketplace doesn't use one.

Latency#

cs2.sh adds ~20 ms or less to a live request. The rest is the marketplace's response time, listed for Youpin, CSFloat, and Steam.

Errors and retries#

Live errors use the shared error object and always include details. Branch on details.code, because message is written for people and can change.

Statusdetails.codeMeaning
400missing_field, invalid_field, unknown_value, unsupported_field, unsupported_filter, invalid_range, conflicting_fields, conflicting_filters, and othersThe request is invalid. Fix it before you send it again.
400cursor_expired, invalid_cursor, cursor_mismatchThe cursor can't be used. Send the original request again, to the path that returned the cursor.
403live_not_enabledYour account can't call this operation.
403live_demo_exhaustedThe demo key has used all its live requests.
404unsupported_market, unsupported_operationThe path isn't a live operation. details.allowed_values lists the ones that exist.
404-The listing, seller, or item doesn't exist on the marketplace. details.field names which.
429live_rate_limitYou're over this operation's per-minute limit.
429live_concurrency_limitToo many of your requests to this operation are in flight.
502-The marketplace returned nothing usable. details.reason is timeout, refused, empty_response, invalid_response, server_error, connection_failed, or structure_unavailable.
503-cs2.sh can't send the request right now.
504-The request ran out of time.

A 400 names the field at fault in details.field, and one of these says how to fix it:

details fieldMeaning
required_fields, required_any_ofThe missing fields. required_any_of lists groups where you must send exactly one.
allowed_valuesThe values the field accepts.
required_valuesFor each field you sent whose value can't be combined with the rest, the values that would work.
conflictsThe fields that can't be sent together.
candidatesThe things the name matches, each with a corrected query.

After a 429, wait details.retry_after_seconds before you send the request again. After a 502, 503, or 504, retry after a short wait with backoff, except a 502 with structure_unavailable.

A request counts against your limit when the marketplace responds, even with a 404 or no rows, and when you cancel it by disconnecting. Rejected and failed requests don't count.