# spark\_getBalance

You can use the `getBalance` method to retrieve your user's Spark wallet balances, i.e. the amount of Bitcoin & BTKN tokens that their [connected wallet](/sats-connect/connecting-to-the-wallet.md)'s Spark address owns.&#x20;

Your app must have first [connected to the wallet](/sats-connect/connecting-to-the-wallet/connect-to-xverse-wallet.md) and obtained [account read permissions.](/sats-connect/xverse-wallet-permissions.md) \
\
No query parameters are required for the method:

```typescript
import { request } from 'sats-connect';

const response = await request('spark_getBalance', undefined);

if (response.status === 'success') {
  console.log(response.result);
} else {
  console.error(response.error);
}
```

The `getBalance` method will **not** trigger any operation or prompt your user to sign any transaction. It will return an object representing the connected wallet's Spark Bitcoin & BTKN holdings:

<table><thead><tr><th width="204">balance </th><th>Description</th></tr></thead><tbody><tr><td><code>balance</code></td><td>A <code>bigint</code> representing the total amount of Bitcoin in satoshis</td></tr><tr><td><code>tokenBalances</code></td><td><p></p><p>A Map of token balances, where each entry contains:</p><ul><li><code>balance</code>: A <code>bigint</code> representing the token amount</li><li><p><code>tokenInfo</code>: an object providing information about the specific token the wallet is holding:</p><ul><li><code>tokenIdentifier</code>: a string representing the token public key   </li><li><code>tokenName</code>: a string representing the token name</li><li><code>tokenTicker</code>: a string representing the token ticker</li><li><code>decimals</code>: a string representing the decimals supported</li><li><code>maxSupply</code>: a string representing the max token supply</li></ul></li></ul></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xverse.app/sats-connect/spark-methods/spark_getbalance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
