> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cabalspy.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Count

> Count how many transactions tracked wallets made within a time window, up to 24 hours back, optionally filtered to a single token.

A lightweight counter. Returns how many transactions tracked wallets made within a time window, up to 24 hours back. Optionally filter to a single token with mint.

Use it for activity indicators and sparklines, for example how many KOL trades happened in the last hour, without pulling the full transaction list.

<Tip>
  The window is built from seconds, minutes and hours, summed, up to a maximum of 24 hours. Without a window you get the full available window. This endpoint returns only the count, not the transactions, so it is fast and cheap.
</Tip>

## Query Parameters

<ParamField query="blockchain" type="string" required>
  Chain. One of solana, bnb, base, eth.
</ParamField>

<ParamField query="type" type="string" required>
  Wallet category kol, smart or whale.
</ParamField>

<ParamField query="seconds" type="integer">
  Seconds to look back. Combined with minutes and hours.
</ParamField>

<ParamField query="minutes" type="integer">
  Minutes to look back.
</ParamField>

<ParamField query="hours" type="integer">
  Hours to look back. Maximum total window is 24 hours.
</ParamField>

<ParamField query="mint" type="string">
  Optional token mint to count only that token transactions.
</ParamField>

<ParamField query="api_key" type="string" required>
  Your API key. Alternatively pass it as an Authorization Bearer header.
</ParamField>

## Usage Example

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.cabalspy.xyz/v1/transactions/count?blockchain=solana&type=kol&hours=1&api_key=YOUR_KEY"
  ```

  ```python Python theme={null}
  import requests

  params = {"blockchain": "solana", "type": "kol", "hours": 1, "api_key": "YOUR_KEY"}
  r = requests.get("https://api.cabalspy.xyz/v1/transactions/count", params=params)
  d = r.json()["data"]
  print("count", d["count"], "over", d["time_window_seconds"], "seconds")
  ```

  ```javascript JavaScript theme={null}
  const p = new URLSearchParams({
    blockchain: "solana", type: "kol", hours: "1", api_key: "YOUR_KEY",
  });
  const res = await fetch(`https://api.cabalspy.xyz/v1/transactions/count?${p}`);
  const { data } = await res.json();
  console.log("count", data.count);
  ```
</CodeGroup>

## Response

<ResponseField name="success" type="boolean">
  True on success.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="data">
    <ResponseField name="blockchain" type="string">
      Requested chain.
    </ResponseField>

    <ResponseField name="type" type="string">
      Requested wallet type.
    </ResponseField>

    <ResponseField name="mode" type="string">
      count.
    </ResponseField>

    <ResponseField name="count" type="integer">
      Number of transactions in the window.
    </ResponseField>

    <ResponseField name="time_window_seconds" type="integer">
      The effective window in seconds, after capping.
    </ResponseField>

    <ResponseField name="mint" type="string">
      Present only when a mint filter was passed.
    </ResponseField>

    <ResponseField name="warnings" type="array">
      Present only if the requested window exceeded the 24 hour maximum and was capped.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "blockchain": "solana",
      "type": "kol",
      "mode": "count",
      "count": 128,
      "time_window_seconds": 3600
    },
    "meta": {
      "request_id": "req_5162c7cf7f87",
      "cached": false,
      "cache_age_seconds": 0,
      "version": "1.0.0",
      "timestamp": "2026-07-06T11:01:57Z"
    }
  }
  ```
</ResponseExample>

## Errors

| Status | Code               | Meaning                                |
| ------ | ------------------ | -------------------------------------- |
| 400    | invalid\_parameter | blockchain or type missing or invalid. |
| 401    | unauthorized       | API key missing.                       |
| 403    | forbidden          | API key invalid or credits exhausted.  |
| 429    | rate\_limited      | Rate limit exceeded.                   |
