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

# Token Tag Counts

> Stream per-tag trader counts for one token.

> [!NOTE]
>
> **Room ID:** `token_tag_counts` \
> **Endpoint:** `wss://staging-api.struct.to/ws`

Live tagged-trader counts for one token: how many traders carry each tag (dev, sniper, migration sniper, block-zero buyer, insider, caller, pro trader, bundler, CEX) and `tagged`, the number of traders with at least one tag. The first message carries the current counts; later messages arrive at `interval_ms` only when a count has changed. Use it to keep the counts next to the trades `tags` filter current.

## Subscribe

`token_address` and an explicit chain selector are required.

### Filters

| Filter | Type | Required | Description |
| - | - | - | - |
| `chain` | `string` | No\* | Chain name: `solana`, `bnb`, `base`, `ethereum`, `robinhood`, `arc` |
| `chain_id` | `integer` | No\* | Chain id: `-1`, `56`, `8453`, `1`, `4663`, `5042` |
| `token_address` | `string` | Yes | Token mint or 0x address |
| `interval_ms` | `integer` | No | `0`, `500`, `1000`, `2500`, `5000`, `10000`. `0` pushes on change. Default 500 |

Provide either `chain` or `chain_id`. Do not send both.

### Example

```json theme={null}
{
  "type": "join_room",
  "payload": {
    "room_id": "token_tag_counts"
  }
}
```

```json theme={null}
{
  "type": "room_message",
  "payload": {
    "room_id": "token_tag_counts",
    "message": {
      "action": "subscribe",
      "chain": "robinhood",
      "token_address": "0x39dBED3a2bd333467115dE45665cC57F813C4571",
      "interval_ms": 0
    }
  }
}
```

## Events

The room emits `token_tag_counts_update`. Pick **Response (Long)** or **Response (Short)** in the right-hand panel. WebSocket defaults to short. See [long and short field names](https://docs.struct.to/api-reference/response-format.md#long-and-short-field-names).

```json Response (Long) theme={null}
{
  "type": "token_tag_counts_update",
  "room_id": "token_tag_counts",
  "interval_ms": 0,
  "chain": "robinhood",
  "chain_id": 4663,
  "data": {
    "token_address": "0x39dBED3a2bd333467115dE45665cC57F813C4571",
    "tagged": 412,
    "dev": 1,
    "sniper": 37,
    "migration_sniper": 4,
    "block_zero_buyer": 22,
    "insider": 9,
    "caller": 3,
    "pro_trader": 118,
    "bundler": 15,
    "cex": 2,
    "updated_at_ms": 1790683200000
  }
}
```

```jsonc Response (Short) theme={null}
{
  "type": "token_tag_counts_update",
  "room_id": "token_tag_counts",
  "interval_ms": 0,
  "chain": "robinhood",
  "chain_id": 4663,
  "data": {
    "ta": "0x39dBED3a2bd333467115dE45665cC57F813C4571",
    "tgd": 412,
    "dv": 1,
    "sn": 37,
    "ms": 4,
    "b0": 22,
    "isn": 9,
    "cl": 3,
    "pt": 118,
    "bd": 15,
    "cx": 2,
    "u": 1790683200000
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.