> 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/function/functions/saved-balance.md).

# Saved Balance

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

Returns structure that can be used to obtain balance of tokens saved at the moment when <mark style="color:red;">`update_balance_formula`</mark> returns <mark style="color:red;">`True`</mark> or any other non-zero value

If <mark style="color:red;">`account_id`</mark> is empty - uses current exchange for bot’s account id

<mark style="color:red;">`coin`</mark> check \[<mark style="color:red;">`balance`</mark>] specification

**Important:** can’t be used in <mark style="color:red;">`update_balance_formula`</mark> inside group

<details>

<summary>Example:</summary>

<mark style="color:red;">`saved_balance('ETH').available`</mark> → 100.2

<mark style="color:red;">`saved_balance('base').reserved`</mark> → 200.3

<mark style="color:red;">`saved_balance(’counter’).total`</mark> → 300.5

<mark style="color:red;">`saved_balance('USDT').total`</mark> → 400.55

</details>
