# GET /v1/solana/account/{address}/token-hygiene

Which of this wallet's Solana token accounts can be closed for rent, or are delegated or frozen?

## Purpose

Scans on finalized state the SPL Token and Token-2022 accounts owned by `address`, one page of at most 1,000 accounts per program, and returns counts only: no accounts, mints, amounts or balances. An account is closable when its amount is 0, its close authority (or else its owner) is `address`, and it holds no withheld transfer fee and no confidential balance; a frozen empty account is still closable. `reclaimable_rent_sol` is the lamports of the closable accounts, in SOL. `close_blocked` counts the empty accounts that cannot be closed now, by cause: withheld_transfer_fees, confidential_balance, foreign_close_authority. Verdict: RISK (delegated or frozen accounts), else ACTION_AVAILABLE (closable accounts), else CLEAN. Reasons: active_token_delegates, frozen_token_accounts, reclaimable_rent, close_blocked, scan_truncated (a program had more accounts than one page). Every figure is read at finalized commitment, so it can lag the tip of the chain by about 13 seconds; `meta.slot` is the lowest context slot of the reads behind the answer.

## When to use

Before cleaning up a wallet: to learn how much rent closing its empty token accounts returns, and whether any token account has an active delegate or is frozen.

## When not to use

To list token accounts, mints or balances (none are returned), or to check one transfer end to end (use `/v1/solana/transfer-readiness`).

## Parameters

| Name | In | Required | Description | Constraints | Example |
|---|---|---|---|---|---|
| `address` | path | yes | Owner wallet whose token accounts are scanned. | A base58 string that decodes to exactly 32 bytes (a Solana public key); anything else is a 400 | `83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri` |

## Request example

```sh
curl -s "https://api.criptonlabs.com/v1/solana/account/83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri/token-hygiene"
```

## Response example (200)

```json
{
  "token_accounts_scanned": 1,
  "closable_accounts": 0,
  "reclaimable_rent_sol": "0",
  "close_blocked": {
    "withheld_transfer_fees": 0,
    "confidential_balance": 0,
    "foreign_close_authority": 0
  },
  "delegated_accounts": 0,
  "frozen_accounts": 0,
  "truncated": false,
  "verdict": "CLEAN",
  "reasons": [],
  "meta": {
    "slot": 468263808,
    "commitment": "finalized",
    "as_of": "2026-11-11T20:51:26.907Z",
    "age_seconds": 0,
    "cache": "miss",
    "stale": false
  }
}
```

## Errors

- 400 [invalid-parameters](https://api.criptonlabs.com/errors/invalid-parameters.md)
- 429 [rate-limited](https://api.criptonlabs.com/errors/rate-limited.md)
- 503 [upstream-unavailable](https://api.criptonlabs.com/errors/upstream-unavailable.md)

## Caching

Fresh for 10 seconds; on upstream failure the last good value is served for up to 120 seconds (`meta.stale` is `true`), then the service answers 503. See the [freshness guide](https://api.criptonlabs.com/docs/guides/freshness.md).

## Rate limit

Tier `expensive`. See the [rate-limits guide](https://api.criptonlabs.com/docs/guides/rate-limits.md).

## MCP tool

The MCP tool `solana_token_hygiene` returns the same data. See the [MCP quickstart](https://api.criptonlabs.com/docs/guides/mcp-quickstart.md).
