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}.
| Operation | Returns | Youpin | CSFloat | Steam |
|---|---|---|---|---|
listings | Listings for one item | Yes | Yes | Yes |
search | Items matching text or filters | Yes | Through listings | Yes |
buy_orders | Buy orders for one item | Yes | Yes | Yes |
float_rank | The marketplace's float ranking for one item | Yes | - | - |
listing_detail | One listing, by its ID | Yes | Yes | In listings |
store | One seller's listings | Yes | Yes | - |
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:
| Row | Field | Request it holds |
|---|---|---|
| Search item | listings_query | That item's listings |
| Listing | detail_query | That listing's listing_detail |
| Listing | store_query | Its 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.
| Field | Type | Meaning |
|---|---|---|
market_hash_name | string | The item, by the same name every other endpoint uses. |
item_id | string | The 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. |
search | string | Text for the marketplace's text search, on the operations that have one. |
seller_id | string | The seller, for store. |
listing | object | The listing, for listing_detail, in listing.listing_id. |
listing_type | string | buy_now, auction, rental, or pre_sale, where the marketplace has them. Without it, the request reads buy_now listings. |
filters | object | Readable filters, such as price, float, paint seed, phase, and stickers. |
sort | object | field and an optional direction, asc or desc. |
market_parameters | object | The marketplace's own request parameters, for controls with no readable filter. See Filters and sorting. |
raw_response | boolean | true returns the marketplace's own JSON, and false returns structured rows. Without it, the response is raw. |
cursor | string | The 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:
| Range | Unit |
|---|---|
min_float, max_float | Float, from 0 to 1 |
min_fade, max_fade | Fade percentage |
min_price, max_price | The 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:
| Marketplace | Several entries | count and slot |
|---|---|---|
| Youpin | The listing must have all of them | Both supported for stickers |
| CSFloat | The listing must have all of them | Both supported for stickers and patches |
| Steam | The 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"
}| Field | Meaning |
|---|---|
field | Required. The request field to list choices for, as a path, such as filters.weapon, filters.stickers.entries[].name, sort, or listing_type. |
contains | Optional. Keeps only labels that contain this text, ignoring case. |
| Anything else | The 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:
| Field | Meaning |
|---|---|
market, operation | The marketplace and operation you requested. |
data | The result, shaped by raw_response. |
page | Paging state, or null when the operation isn't paged. |
response_time | When cs2.sh generated the response. |
warnings | Notes 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:
| Operation | data |
|---|---|
listings, store | listings[] of LiveListing |
listing_detail | listing, one LiveListing |
buy_orders | buy_orders[] of LiveBuyOrder. Steam returns its orderbook instead: SteamBuyOrderBook. |
float_rank | rankings[] of LiveFloatRanking |
search | items[] 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.
| Marketplace | Page sizes |
|---|---|
| Youpin | listings, search, and float_rank: 20. buy_orders and store: 100. |
| CSFloat | listings and store: 50. |
| Steam | listings: 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.
| Marketplace | Currency |
|---|---|
| Youpin | CNY |
| CSFloat | USD |
| Steam | USD, 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.
| Status | details.code | Meaning |
|---|---|---|
400 | missing_field, invalid_field, unknown_value, unsupported_field, unsupported_filter, invalid_range, conflicting_fields, conflicting_filters, and others | The request is invalid. Fix it before you send it again. |
400 | cursor_expired, invalid_cursor, cursor_mismatch | The cursor can't be used. Send the original request again, to the path that returned the cursor. |
403 | live_not_enabled | Your account can't call this operation. |
403 | live_demo_exhausted | The demo key has used all its live requests. |
404 | unsupported_market, unsupported_operation | The 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. |
429 | live_rate_limit | You're over this operation's per-minute limit. |
429 | live_concurrency_limit | Too 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 field | Meaning |
|---|---|
required_fields, required_any_of | The missing fields. required_any_of lists groups where you must send exactly one. |
allowed_values | The values the field accepts. |
required_values | For each field you sent whose value can't be combined with the rest, the values that would work. |
conflicts | The fields that can't be sent together. |
candidates | The 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.