GET /v1/live/capabilities
Returns a machine-readable description of every live operation: its path, the JSON schemas of its request and structured response, its filters, sort fields, listing types, and page size, and example requests.
Available on all plans, at 10 requests per second.
It lists every operation, whether or not your plan includes it.
It isn't a live request. It doesn't count toward the live limits or use a demo key's live requests.
Query parameters
| Parameter | Description |
|---|---|
market | Returns only this marketplace: youpin, csfloat, or steam. |
operation | Returns only this operation, such as listings or buy_orders. |
Both are optional and can be combined, as in ?market=youpin&operation=listings. The full document is ~450 KB before compression.
Request
curl https://api.cs2.sh/v1/live/capabilities \
-H "Authorization: Bearer <<YOUR_API_KEY>>" \
-H "Accept-Encoding: gzip" --compressedResponse
{
"contract_version": 0,
"markets": [
{
"market": "string",
"currency": "string",
"operations": null
}
],
"continuation_schema": null,
"response_contract": null
}Response fields
LiveCapabilitiesResponse fields:
| Field | Type | Required | Description |
|---|---|---|---|
contract_version | integer | No | The version of this document's format. |
markets | LiveCapabilitiesMarket[] | No | One entry per marketplace. |
continuation_schema | object | No | The JSON Schema of a next-page body that holds only cursor. |
response_contract | object | No | Short rules every live response follows. |
Response data
contract_version is currently 1. Each entry in markets[] has the marketplace's market, currency, and operations, keyed by operation name.
Each operation lists:
| Field | Meaning |
|---|---|
path, options_path | Where to POST the request, and where to POST its options request. |
request_schema | JSON Schema for the request body, with one variant per listing_type where the operation has listing types. |
options_schema | JSON Schema for the options request body. |
response_schema | JSON Schema for data with raw_response: false. |
required_fields, required_any_of | The fields a request must have. required_any_of lists groups where exactly one is needed. |
default_listing_type, listing_modes | The operation's listing types and the page size of each. Empty when it has none. |
page_size | Rows per page, or null when the operation isn't paged. |
common_filters | The names accepted in filters. |
sort_fields | The values accepted in sort.field. |
market_parameters | The names accepted in market_parameters. |
semantics | The marketplace's currency, what price means for each listing type, and how several stickers, patches, or charms combine. |
examples | Valid request bodies for path. |
Using the schemas
The schemas are JSON Schema, Draft 2020-12. request_schema is the complete truth for field names, types, allowed values, and bounds, and common_filters, sort_fields, and market_parameters summarize it.
A schema can't express three checks, which cs2.sh makes when you send the request:
- whether the item exists;
- whether a minimum is below its maximum;
- whether a phase or sticker belongs to the item you named.
A failed check returns a 400 live error with details.code and details.field. Values from the marketplace's catalog, such as sticker names, collections, and phases, come from the operation's options path.
Errors
The request returns 400 validation_error in three cases:
- an unknown
marketoroperation, with the valid ones indetails.allowed_values; - a repeated parameter;
- a parameter other than
marketandoperation.
Other errors are the shared request errors.