> For the complete documentation index, see [llms.txt](https://tutorial.neoline.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tutorial.neoline.io/reference/neo3-provider-api/getbalance.md).

# getBalance

Gets the balance of the specified asset for the specified account.

## Parameters

#### 1. asset *(required)*

`UInt160`

The contract hash of the asset or token.

#### 2. account *(required)*

`UInt160`

The script hash of the account to query.

## Returns

`Promise<Integer>`

`Integer` can be returned as a string or number.

## Errors

| Code    | Name        | Description                           |
| ------- | ----------- | ------------------------------------- |
| `10002` | `INVALID`   | One or more inputs are invalid.       |
| `10003` | `NOTFOUND`  | The account or asset cannot be found. |
| `10004` | `FAILED`    | Contract execution failed.            |
| `10008` | `RPC_ERROR` | The RPC server returned an error.     |

## Example

### Request

```js
const balance = await provider.getBalance(
  "0xd2a4cff31913016155e38e474a2c06d08be276cf",
  "0x9a7c5085dcdd4adf9ec12f2d1a7d6b741ad4b20a",
);
```

### Response

```js
"2166122424085"
```
