> For the complete documentation index, see [llms.txt](https://docs.origami.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.origami.tech/reference/grid-language/functions/balance.md).

# balance()

balance() returns the available, reserved and total balance of a token on the bot's account or another account.

Explore how the Balance function in Origami Tech retrieves and processes account balances, asset values, and portfolio data for trading automation.

## `balance`(*coin*: *str*, *account\_id*: *Optional*\[*int*]) -> \[*Balance*]

Parametrs:

coin: {‘base’, ‘counter’, token ticker}

`coin` \[shortcuts] can’t be used in `update_balance_formula` inside group

account\_id: int, default current bot account id

`account_id` should be specified for usage in `update_balance_formula` inside group

Returns:

Returns structure that can be used to obtain balance of tokens on the account

<details>

<summary>Example:</summary>

`balance('USDT').available` → 1000.2

`balance('ETH').reserved` → 20.3

`balance(’BTC’).total` → 1.5

`balance(’counter’).reserved` → 6.55

`balance('base').total` → 300.5

`balance('base', account_id=100).total` → 10

</details>
