# getBalance

You can use the `getBalance` method to retrieve your user's Bitcoin balance, i.e. the amount of BTC that their [connected wallet](/sats-connect/connecting-to-the-wallet.md)'s Bitcoin payment 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('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 payment address BTC holdings:

<table><thead><tr><th width="204">balance </th><th>Description</th></tr></thead><tbody><tr><td><code>confirmed</code></td><td>a string representing the connected wallet's <strong>confirmed</strong> BTC balance, i.e. the amount of <strong>confirmed</strong> BTC which the payment address holds, in satoshis</td></tr><tr><td><code>unconfirmed</code></td><td>a string representing the connected wallet's <strong>unconfirmed BTC</strong> balance, i.e. the amount of <strong>unconfirmed</strong> BTC which the payment address will send/receive as a result of pending mempool transactions, in satoshis<br><span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span>Note that this amount can be negative if the net result of pending mempool transaction decreases the address balance.</td></tr><tr><td><code>total</code></td><td>a string representing the sum of <code>confirmed</code> and <code>unconfirmed</code> BTC balances.</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/bitcoin-methods/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.
