New: live data for Youpin, CSFloat, and Steam

POST /v1/live/csfloat/buy_orders

Returns the current CSFloat buy orders for one item, or the orders that match one listing. Each order has a price, a quantity, and the conditions it puts on the item, such as a float range, a phase, paint seeds, or stickers.

Available on all plans, at 6 requests per minute on Developer and 36 on Scale. Each request is for one item or one listing.

Prices are in USD and aren't converted. Data is real-time.

CSFloat returns its top orders for the request, ~25, not a full orderbook. For buy orders across every item, updated on a schedule, use GET /v1/market/csfloat/latest.

Inputs#

FieldRequiredMeaning
market_hash_nameEither this or listingThe item, by its exact name. A Doppler or Gamma Doppler phase in the name returns that variant's orders.
listingEither this or market_hash_nameA CSFloat listing, by its listing ID in listing.listing_id. Returns the buy orders that listing matches. Not with filters.
filtersNoThe item you want to sell. See Filters. Only with market_hash_name.
raw_responseNofalse returns structured rows instead of CSFloat's JSON.
{
  "market_hash_name": "AK-47 | Redline (Field-Tested)",
  "filters": { "min_float": 0.15, "max_float": 0.18 }
}

Filters#

The filters describe the item you want to sell, and CSFloat returns the orders that would take it. Every filter is optional.

FilterTypeMeaning
min_float, max_floatnumberThe float range of the item you're selling, from 0 to 1. See Float matching.
phasestringA Doppler or Gamma Doppler phase or gem. Orders that take any phase can come back too.
paint_seedsinteger[]Up to 25 paint seeds, each from 0 to 1000.
stickersobjectUp to 5 entries, each by name or id. An entry can add a count from 1 to 20 or a slot from 0 to 4.
charmsobjectOne entry, by name or id.
min_charm_pattern, max_charm_patternintegerThe attached charm's pattern range, from 1 to 99999.

CSFloat's own request parameters go in market_parameters.

Sorting#

Buy orders take no sort, and come back highest price first.

Request#

POSTapi.cs2.sh/v1/live/csfloat/buy_orders
curl -X POST https://api.cs2.sh/v1/live/csfloat/buy_orders \
  -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": {
    "min_float": 0.15,
    "max_float": 0.18
  },
  "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#

By default, data is CSFloat's own JSON, with prices in cents. With raw_response: false, data.buy_orders[] holds one LiveBuyOrder per order:

FieldDescription
price, currencyThe order price in USD.
quantityHow many items the order wants at that price.
market_hash_nameThe item the order is for.
conditionsThe order's restrictions, as min_float, max_float, variant, paint_seeds, and stickers. null means the order takes any copy of the item.
id, created_atAlways null, because CSFloat reports orders as price and quantity rows.

Float matching#

A float range returns the orders whose accepted range covers all of it, plus the orders with no float condition. With min_float 0.15 and max_float 0.18:

Order acceptsReturned
Any floatYes
0.15 to 0.20Yes
0.16 to 0.17No. It doesn't cover the whole range.
0.17 to 0.25No. It only overlaps.

To check one exact float, send it as both bounds. On Youpin, the bounds must equal an order's own bounds instead.

Notes#

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.

Errors#

If CSFloat has no listing with the ID in listing.listing_id, the request returns 404 with details.field set to listing.listing_id. Other errors are the shared live errors.

POST /v1/live/csfloat/buy_orders/options#

Returns the valid choices for one field of a buy orders request. The filters take free input, such as floats, seeds, and names, so only one field has choices:

fieldChoicesNeeds an item
market_hash_nameThe item's Doppler or Gamma Doppler variantsYes

Each option's query is a complete buy orders request for that variant.

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

Sticker and charm names come from the listings options path.

Request#

POSTapi.cs2.sh/v1/live/csfloat/buy_orders/options
curl -X POST https://api.cs2.sh/v1/live/csfloat/buy_orders/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": "market_hash_name"
}'

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