Balancer

Examples

balancer

Reference

async ctc.protocols.balancer_utils.async_get_pool_address(pool_id, block=None, vault=None)
Parameters
  • pool_id (str) –

  • block (BlockNumberReference | None) –

  • vault (Address | None) –

Return type

Address

async ctc.protocols.balancer_utils.async_get_pool_balances(*, pool_address=None, pool_id=None, block='latest', vault=None, normalize=True)
async ctc.protocols.balancer_utils.async_get_pool_fees(pool_address, block='latest', normalize=True)
Parameters
  • pool_address (<class 'str'>) –

  • block (Union[SupportsRound, str, int, Literal['latest'], Literal['earliest'], Literal['pending']]) –

  • normalize (<class 'bool'>) –

Return type

Union[int, float]

async ctc.protocols.balancer_utils.async_get_pool_id(pool_address, block=None)
Parameters
  • pool_address (Address) –

  • block (BlockNumberReference | None) –

Return type

str

async ctc.protocols.balancer_utils.async_get_pool_swaps(pool_address=None, start_block=None, end_block=None, vault=None)
Parameters
  • pool_address (Union[str, NoneType]) –

  • start_block (Union[SupportsRound, str, int, Literal['latest'], Literal['earliest'], Literal['pending'], NoneType]) –

  • end_block (Union[SupportsRound, str, int, Literal['latest'], Literal['earliest'], Literal['pending'], NoneType]) –

  • vault (Union[str, NoneType]) –

Return type

Any

async ctc.protocols.balancer_utils.async_get_pool_tokens(*, pool_address=None, pool_id=None, block=None, vault=None)
Parameters
  • pool_address (Address | None) –

  • pool_id (str | None) –

  • block (BlockNumberReference | None) –

  • vault (Address | None) –

Return type

list[Address]

async ctc.protocols.balancer_utils.async_get_pool_weights(pool_address, block='latest', normalize=True)
async ctc.protocols.balancer_utils.async_get_pool_weights_by_block(pool_address, blocks, normalize=True)
async ctc.protocols.balancer_utils.async_summarize_pool_state(pool_address, block='latest')
Parameters
  • pool_address (<class 'str'>) –

  • block (Union[SupportsRound, str, int, Literal['latest'], Literal['earliest'], Literal['pending']]) –

Return type

<class ‘BalancerPoolState’>