Skip to content

API Reference / Intents

Count this workspace's intent rollup for a side

Returns how many rows, one per item and float window, the workspace's own buying or selling rollup has under the same filter as ListWorkspaceIntentRollup, so a tab shows its total without paging.

POST/contracts.v1.Contracts/CountWorkspaceIntentRollup

Request body

application/jsonRequired

Request for the number of the caller's workspace's combined buying or selling targets matching a filter, the total behind a ListWorkspaceIntentRollup tab.

filter?WorkspaceIntentRollupFilter

The same filter as ListWorkspaceIntentRollup. Absent counts every row of the side.

Show attributes
atHoldLimit?boolean

Requires contract_id. True keeps only rows whose owned_count has reached that contract's max owned per item. False keeps the rest. A contract without that limit has no row at it. Omitted includes both.

boughtNothing?boolean

True keeps only rows whose purchases_7d_count is zero. False keeps only rows with at least one such purchase. Omitted includes both.

cheapestSeen?string

Only rows whose cheapest listing seen in the last 24 hours stands this way against the max price. Buying side only. Omitted includes every row.

Value in"WORKSPACE_INTENT_CHEAPEST_SEEN_JUST_OVER_MAX_PRICE""WORKSPACE_INTENT_CHEAPEST_SEEN_OVER_MAX_PRICE""WORKSPACE_INTENT_CHEAPEST_SEEN_AT_OR_UNDER_MAX_PRICE""WORKSPACE_INTENT_CHEAPEST_SEEN_NONE_SEEN"

contractId?string

Only rows one of whose contributing active intents belongs to this contract of the caller's workspace. Absent does not restrict.

Format"byte" base64

hasStock?boolean

True keeps only rows whose held_count is above zero. False keeps only rows with nothing held. Omitted includes both.

marketHashNames?array<string>

Exact market_hash_name set, OR within the field, so one read prices a page of catalog items. Empty includes every item. At most 200 names, each nonempty.

query?string

Optional case-insensitive substring, matched server side against the row's market_hash_name or against the name of any of this workspace's contracts contributing an active intent to the row. Absent or empty returns every row.

selections?array<ItemCategorySelection>

Only rows whose item is in one of these catalog categories, each narrowed by weapon type for skins, OR within the field. At most 20, under the catalog filter's own rules. Empty includes every row.

Show attributes
category?string

The catalog category.

Value in"ITEM_CATEGORY_WEAPON_SKIN""ITEM_CATEGORY_KNIFE_SKIN""ITEM_CATEGORY_GLOVE_SKIN""ITEM_CATEGORY_STICKER""ITEM_CATEGORY_PATCH""ITEM_CATEGORY_CASE""ITEM_CATEGORY_STICKER_CAPSULE""ITEM_CATEGORY_MUSIC_KIT""ITEM_CATEGORY_AGENT""ITEM_CATEGORY_KEY""ITEM_CATEGORY_GRAFFITI""ITEM_CATEGORY_KEYCHAIN""ITEM_CATEGORY_COMMODITY_PIN""ITEM_CATEGORY_TOOL"

weaponTypes?array<string>

Weapon types inside the category, as the catalog names them (rifle, sniper, pistol, smg, heavy), any of them. Empty selects the whole category.

sidestring

Which intent direction to count: BUYING or SELLING. Required.

Value in"CONTRACT_TYPE_BUYING""CONTRACT_TYPE_SELLING"

Response body

application/json

Success

categories?array<WorkspaceIntentRollupCategoryCount>

The catalog categories of the rows matching every part of the filter but selections, each with its row count, so a category filter offers only what the workspace has. Ordered by category, then weapon type.

Show attributes
category?string

The catalog category.

Value in"ITEM_CATEGORY_WEAPON_SKIN""ITEM_CATEGORY_KNIFE_SKIN""ITEM_CATEGORY_GLOVE_SKIN""ITEM_CATEGORY_STICKER""ITEM_CATEGORY_PATCH""ITEM_CATEGORY_CASE""ITEM_CATEGORY_STICKER_CAPSULE""ITEM_CATEGORY_MUSIC_KIT""ITEM_CATEGORY_AGENT""ITEM_CATEGORY_KEY""ITEM_CATEGORY_GRAFFITI""ITEM_CATEGORY_KEYCHAIN""ITEM_CATEGORY_COMMODITY_PIN""ITEM_CATEGORY_TOOL"

count?integer

The number of targets.

Format"int32"

weaponType?string

The weapon type inside the category, as the catalog names it. Unset for a category with no weapon type.

count?integer

Number of rows, one per item and float window, ListWorkspaceIntentRollup returns for the same side and filter.

Format"int32"

curl -X POST "https://api.goldmine.to/contracts.v1.Contracts/CountWorkspaceIntentRollup" \
  -H "Authorization: Bearer $CSTRADER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "side": "CONTRACT_TYPE_SELLING",
    "filter": {
      "hasStock": true
    }
  }'
{
  "count": 12
}