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

# Tokens

> Wallet token balances with include=tokens, kept separate from DeFi totals.

Wallet token balances with `include=tokens`: native SOL plus every non-zero SPL / Token-2022 mint, with metadata,
prices, `verified` / `spam_suspected`, `counted_in_position`, and a separate `tokens_total` that never mixes with the
DeFi `totals`. `tokens` is not in the default `include`.

```bash theme={null}
BASE_URL="https://api.lucidblock.xyz"
curl -s -H "Authorization: Bearer $LUCIDBLOCK_TOKEN" \
  "$BASE_URL/v1/solana/wallets/$W/defi-positions?include=underlying,rewards,valuation,metadata,tokens"
```

## WalletTokens

Returned as `tokens` only with `include=tokens` (null otherwise, or for a snapshot stored before tokens existed). It
covers the whole snapshot (identical on every page) and comes from the same scan: the wallet's SPL Token and Token-2022
accounts plus one `getBalance` for native SOL. Its total, `tokens_total`, is separate from `totals` and never added to
it.

**scan.spl\_token, scan.token\_2022, scan.native\_sol** `complete | error`

Whether each read succeeded. Any `error` makes `tokens_total.total_value_usd` null.

**holdings\[]** `object`

Native SOL first (mint `11111111111111111111111111111111`, `token_program: native`), then one row per mint with a
non-zero balance (`spl_token` or `token_2022`), token accounts summed.

**holdings\[].amount\_raw, decimals, amount** `string, integer, decimal`

As on a leg.

**holdings\[].symbol, name, logo\_url** `string | null`

From the metadata resolver (display only).

**holdings\[].verified** `boolean`

In our verified token sources.

**holdings\[].spam\_suspected** `boolean`

Unverified and either unpriced or flagged `suspicious_name` / `symbol_collision`. Never in `tokens_total`.

**holdings\[].price\_usd, value\_usd, valuation\_status, pricing\_source, price\_as\_of**

Same rules as a leg: unpriced means `value_usd: null`, never `0`.

**holdings\[].counted\_in\_position** `string | null`

The position id that already counts this token (LP mint, LST or vault share, position NFT). Never in `tokens_total`.

**holdings\[].in\_total** `boolean`

Counted in `tokens_total.total_value_usd`.

## tokens\_total

> [!WARNING]
>
> `tokens_total` is never added to the DeFi `totals`, and a token already counted by a position (`counted_in_position`)
> or suspected as spam is never in `tokens_total`.

`tokens_total` (null without `valuation`): `total_value_usd` (null unless every counted holding is `priced` and the scan
and snapshot are complete and fresh; `total_null_reasons` from `coverage_incomplete`, `unpriced_tokens`,
`indicative_tokens`, `stale_tokens`), `known_value_usd` (priced + indicative), `valuation_status`, per-status counts,
`counted_in_position_count`, `spam_suspected_count`, `note`.


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