API Reference / Inventory
Count cached workspace holdings and inventory coverage
Read existing cached holdings of active accounts in the selected workspace. This never fetches Steam synchronously or creates managed purchase stock. Exact account and literal item-name filters apply before pagination and counting. Coverage distinguishes checked, pending, private and offline accounts.
/ steam. v1. Steam/ CountWorkspaceInventoryRequest body
application/jsonRequired
Request for the number of cached holdings matching a filter across the caller's workspace, with per-account inventory coverage. Never fetches from Steam.
filter?WorkspaceInventoryFilterThe same filter as the holdings list. Coverage counts and account_set_id depend only on account_name and remain independent of the item predicates.
Show attributes
accountName?stringOne exact active account name. Absent or empty includes all active accounts in the selected workspace.
categories?array<string>Authoritative CS2 catalog categories, OR within the field, matched before paging. Empty includes every category. Items without catalog metadata do not match a non-empty set.
Value in"ITEM_"ITEM_"ITEM_"ITEM_"ITEM_"ITEM_"ITEM_"ITEM_"ITEM_"ITEM_"ITEM_"ITEM_"ITEM_"ITEM_
itemNameExact?stringExact case-sensitive market hash name, without trimming. Use when listing other holdings of one selected item. Absent or empty includes all items.
query?stringLiteral case-insensitive substring of market hash name. Wildcards are treated as ordinary characters.
tradabilities?array<string>Tradability set, OR within the field. Empty includes every holding. Held is locked and never tradable together, so it may be combined with either.
Value in"WORKSPACE_"WORKSPACE_"WORKSPACE_"WORKSPACE_
weaponType?stringThe exact canonical CS2 catalog weapon type, such as rifle, sniper or pistol. Items without catalog metadata do not match.
Response body
application/json
Success
accountSetId?stringSHA-256 of the selected active account names, lifecycle generations and current Steam identities from the same database snapshot as the counts. Independent of the item-name filter. Empty from older servers provides no membership proof.
cachedAssetCount?stringNumber of cached asset records matching all filters, across the whole workspace rather than the loaded page. This is not a count of account-grouped list rows.
Format"int64"
cachedQuantity?stringSum of cached stack quantities matching all filters. Returned as a JSON string to preserve integer precision.
Format"int64"
checkedAccounts?integerSelected accounts with a recorded successful inventory check, including accounts whose checked inventory was empty.
Format"int32"
offlineAccounts?integerSelected accounts not recorded as logged on. Their cached holdings may remain available. May overlap other coverage counts.
Format"int32"
pendingAccounts?integerSelected accounts with no successful inventory check recorded. Their cache may contain older holdings. Pending does not mean empty.
Format"int32"
privateAccounts?integerSelected accounts whose public inventory is currently marked private or unavailable. May overlap checked, pending or offline counts.
Format"int32"
totalAccounts?integerNumber of active accounts selected by the account filter. Coverage counts are independent of the item-name filter.
Format"int32"
application/json
The request was malformed, such as a missing required field or an unparseable cursor.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request lacks a valid API key in the Authorization header.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The API key is not allowed to perform this action on this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
An internal server error occurred.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
curl -X POST "https://api.goldmine.to/steam.v1.Steam/CountWorkspaceInventory" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"accountName": "flip_eu_02",
"categories": [
"ITEM_CATEGORY_WEAPON_SKIN"
],
"itemNameExact": "AK-47 | Redline (Field-Tested)",
"query": "example",
"tradabilities": [
"WORKSPACE_INVENTORY_TRADABILITY_TRADABLE"
],
"weaponType": "example"
}
}'const res = await fetch("https://api.goldmine.to/steam.v1.Steam/CountWorkspaceInventory", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"filter": {
"accountName": "flip_eu_02",
"categories": [
"ITEM_CATEGORY_WEAPON_SKIN"
],
"itemNameExact": "AK-47 | Redline (Field-Tested)",
"query": "example",
"tradabilities": [
"WORKSPACE_INVENTORY_TRADABILITY_TRADABLE"
],
"weaponType": "example"
}
}),
});
const data = await res.json();body := strings.NewReader(`{
"filter": {
"accountName": "flip_eu_02",
"categories": [
"ITEM_CATEGORY_WEAPON_SKIN"
],
"itemNameExact": "AK-47 | Redline (Field-Tested)",
"query": "example",
"tradabilities": [
"WORKSPACE_INVENTORY_TRADABILITY_TRADABLE"
],
"weaponType": "example"
}
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/steam.v1.Steam/CountWorkspaceInventory", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/steam.v1.Steam/CountWorkspaceInventory",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"filter": {
"accountName": "flip_eu_02",
"categories": [
"ITEM_CATEGORY_WEAPON_SKIN"
],
"itemNameExact": "AK-47 | Redline (Field-Tested)",
"query": "example",
"tradabilities": [
"WORKSPACE_INVENTORY_TRADABILITY_TRADABLE"
],
"weaponType": "example"
}
},
)
data = res.json(){
"accountSetId": "example",
"cachedAssetCount": "3",
"cachedQuantity": "3",
"checkedAccounts": 3,
"offlineAccounts": 3,
"pendingAccounts": 3,
"privateAccounts": 3,
"totalAccounts": 3
}{
"code": "invalid_argument",
"message": "The request was malformed, such as a missing required field or an unparseable cursor."
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "internal",
"message": "An internal server error occurred."
}