Skip to content

API Reference / Steam accounts

Count Steam accounts

Returns the number of Steam accounts in your workspace per session status, optionally filtered to soft-deleted accounts instead of active ones, so a list page can render its total and online-session counts without loading and counting every row.

POST/steam.v1.Steam/CountAccounts

Request body

application/jsonRequired

Request for the number of Steam accounts in the caller's workspace per session status, using the same filter as ListAccounts.

filter?AccountFilter

The same filter as ListAccounts. Counts group by session status, so only the list's statuses restriction is omitted.

Show attributes
accountNames?AccountNameSet

Only accounts with one of these exact names, so a list another service narrows (such as the accounts in one market connection state) can be listed and counted. A set with no names matches no account. Unset does not restrict. At most 1000 names.

Show attributes
names?array<string>

The account names.

banSeverities?array<string>

Ban severity set, OR within the field. With session_statuses and the list's statuses it forms one Status choice, so an account matches when its session status or its ban severity is chosen. The other fields AND. Empty includes every severity.

Value in"ACCOUNT_BAN_SEVERITY_NONE""ACCOUNT_BAN_SEVERITY_WARNING""ACCOUNT_BAN_SEVERITY_STOPS_TRADING"

banSeverityFilter?array<string>

Ban severity set, OR within the field, that ANDs with every other field (the Bans filter of the account list). Unlike ban_severities it does not join the session statuses in one Status choice. Empty does not restrict.

Value in"ACCOUNT_BAN_SEVERITY_NONE""ACCOUNT_BAN_SEVERITY_WARNING""ACCOUNT_BAN_SEVERITY_STOPS_TRADING"

deleted?boolean

True selects only soft-deleted accounts (the Deleted filter). False selects only active accounts. Omitted includes both, so a caller that wants the active set sends false.

excludedAccountNames?AccountNameSet

Every account but those with one of these exact names. Unset or a set with no names excludes none. At most 1000 names.

Show attributes
names?array<string>

The account names.

hasApiKey?boolean

True selects only accounts with their own Steam Web API key saved, false only accounts without one (which use the workspace's backup key when it has one). Unset includes both.

hasProxyAssignment?boolean

True selects only accounts with a live proxy assignment, false only accounts with none, so the accounts that have no proxy can be listed and counted. Unset includes both.

inventoryStates?array<string>

Inventory states, OR within the field: never read, public, or private. Empty does not restrict.

Value in"ACCOUNT_INVENTORY_STATE_NOT_CHECKED""ACCOUNT_INVENTORY_STATE_READABLE""ACCOUNT_INVENTORY_STATE_PRIVATE"

proxyPoolIds?array<string>

Proxy pool ids, OR within the field: only accounts with a live proxy assignment in one of these pools. Empty does not restrict. At most 100 pools.

query?string

Literal case-insensitive account-name substring, applied server side before pagination. Absent or empty matches every account.

sessionErrorReasons?array<string>

Session error reasons, OR within the field: only accounts whose session is in error now for one of these reasons. Empty does not restrict.

Value in"SESSION_ERROR_REASON_PROXY_NOT_ASSIGNED""SESSION_ERROR_REASON_PROXY_POOL_UNAVAILABLE""SESSION_ERROR_REASON_PROXY_UNREACHABLE""SESSION_ERROR_REASON_PROXY_AUTHENTICATION_FAILED""SESSION_ERROR_REASON_CREDENTIALS_REJECTED""SESSION_ERROR_REASON_ACCOUNT_RESTRICTED""SESSION_ERROR_REASON_LOGIN_THROTTLED""SESSION_ERROR_REASON_STEAM_UNAVAILABLE""SESSION_ERROR_REASON_WEB_SESSION_FAILED""SESSION_ERROR_REASON_INTERNAL"

sessionStatuses?array<string>

Session status set, OR within the field, so the accounts in one or more states can be listed and counted without reading every account. Empty includes every status.

Value in"SESSION_STATUS_DISCONNECTED""SESSION_STATUS_CONNECTING""SESSION_STATUS_CONNECTED""SESSION_STATUS_LOGGED_ON""SESSION_STATUS_ERROR"

Response body

application/json

Success

counts?array<AccountSessionStatusCount>

Count of accounts in each session status, scoped to the workspace and the filter. A status with no accounts may be omitted.

Show attributes
count?integer

Number of accounts in this session status.

Format"int32"

sessionStatus?string

The session status this count is for.

Value in"SESSION_STATUS_DISCONNECTED""SESSION_STATUS_CONNECTING""SESSION_STATUS_CONNECTED""SESSION_STATUS_LOGGED_ON""SESSION_STATUS_ERROR"

curl -X POST "https://api.goldmine.to/steam.v1.Steam/CountAccounts" \
  -H "Authorization: Bearer $CSTRADER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "counts": [
    {
      "sessionStatus": "SESSION_STATUS_LOGGED_ON",
      "count": 312
    },
    {
      "sessionStatus": "SESSION_STATUS_DISCONNECTED",
      "count": 335
    }
  ]
}