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

# Get SPL Token Balance

Check a wallet's SPL token balance on Solana. Returns the raw token amount, human-readable balance, and token decimals. Supports any SPL token (USDC, BONK, etc.) on mainnet and devnet. Checks the Associated Token Account (ATA) for the given wallet + mint.

![Get SPL Token Balance logo](https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/solana/info/logo.png)
Catalog action Solana Onchain

Check a wallet's SPL token balance on Solana. Returns the raw token amount, human-readable balance, and token decimals. Supports any SPL token (USDC, BONK, etc.) on mainnet and devnet. Checks the Associated Token Account (ATA) for the given wallet + mint.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `get-spl-token-balance` |
| Category | Solana Onchain |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `solana`, `spl`, `token`, `balance`, `query`, `read` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `walletAddress` | `string` | Yes | Solana wallet address to check the balance for. |
| `tokenMintAddress` | `string` | Yes | The token's contract address on Solana. You can find this on the token's page on Solscan or Jupiter. |
| `chainId` | `number` | Yes | Solana network \(Mainnet or Devnet\) |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `balance` | `string` | Yes | Raw token balance in smallest unit \(e.g. '1500000' for 1.5 USDC\) |
| `formattedBalance` | `string` | Yes | Human-readable balance \(e.g. '1.5'\) |
| `decimals` | `number` | Yes | Token decimal places |
| `walletAddress` | `string` | No | Wallet address that was checked. |
| `tokenMintAddress` | `string` | No | The token's contract address. |
| `tokenAccountAddress` | `string \| null` | No | Associated token account address holding the tokens, or null if no account exists |
| `chainId` | `number` | No | Solana chain ID |

## Examples

**Workflow node**

```json
{
  "type": "get-spl-token-balance",
  "payload": {
    "walletAddress": "7v91N7iZ9mNicL8WfG6cgSCKyRXydQjLh6UYBWwm6y1Q",
    "tokenMintAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "chainId": 7565164
  },
  "children": []
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/get-spl-token-balance/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "walletAddress": "7v91N7iZ9mNicL8WfG6cgSCKyRXydQjLh6UYBWwm6y1Q",
    "tokenMintAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "chainId": 7565164
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.