For the complete documentation index, see llms.txt. This page is also available as Markdown.

Balance

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

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