Balance

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 you can find in URL https://terminal.bitmaker.fi/accounts/add?accountID=10

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

Example:

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

Last updated