# Balance

## <mark style="color:purple;">`balance`</mark>(*coin*: *str*, *account\_id*: *Optional*\[*int*]) -> \[[*<mark style="color:blue;">Balance</mark>*](https://docs.origami.tech/function/structures/balance)]

Parametrs:

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

<mark style="color:red;">`coin`</mark> \[shortcuts] can’t be used in <mark style="color:red;">`update_balance_formula`</mark> inside group

account\_id: int, default current bot account id

Account id you can find in URL <https://terminal.bitmaker.fi/accounts/add?accountID=10>

<mark style="color:red;">`account_id`</mark> should be specified for usage in <mark style="color:red;">`update_balance_formula`</mark> inside group

Returns:

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

<details>

<summary>Example:</summary>

<mark style="color:red;">`balance('USDT').available`</mark> → 1000.2

<mark style="color:red;">`balance('ETH').reserved`</mark> → 20.3

<mark style="color:red;">`balance(’BTC’).total`</mark> → 1.5

<mark style="color:red;">`balance(’counter’).reserved`</mark> → 6.55

<mark style="color:red;">`balance('base').total`</mark> → 300.5

<mark style="color:red;">`balance('base', account_id=100).total`</mark> → 10

</details>
