Get Balance for One Token
Look up a wallet's balance for a specific token. Faster than fetching all balances when you only need one. Use a contract address for ERC-20 tokens or 'native' for ETH/MATIC. Returns balance and USD value.
Catalog action Blockchain Data
Look up a wallet's balance for a specific token. Faster than fetching all balances when you only need one. Use a contract address for ERC-20 tokens or 'native' for ETH/MATIC. Returns balance and USD value.
At a Glance
| Field | Value |
|---|---|
| Action ID | sim-dune-get-single-token-balance |
| Category | Blockchain Data |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | sim-dune, blockchain, wallet, balance, token, single, erc20, native, efficient, check, read |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
address | string | Yes | Wallet address to get balance for |
tokenAddress | string | Yes | Token contract address (use 'native' for native asset like ETH) |
chainId | number | Yes | Chain ID (required - single chain query) |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
address | string | Yes | Wallet address queried |
balances | array | Yes | Token balance (single item array) |
totalValueUsd | number | No | USD value of the token balance |
warnings | array | No | Any warnings from the provider |
Examples
json{ "type": "sim-dune-get-single-token-balance", "payload": { "address": "0x0000000000000000000000000000000000000000", "tokenAddress": "0x0000000000000000000000000000000000000000", "chainId": 8453 }, "children": []}
bashcurl -X POST "https://api.b3os.org/v1/actions/sim-dune-get-single-token-balance/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "address": "0x0000000000000000000000000000000000000000", "tokenAddress": "0x0000000000000000000000000000000000000000", "chainId": 8453 }}'
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.
