Curve

Examples

curve

Reference

async ctc.protocols.curve_utils.async_get_base_pools(start_block=None, end_block=None, provider=None, verbose=False)
Parameters
  • 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]) –

  • provider (Union[str, PartialProvider, Provider, NoneType]) –

  • verbose (<class 'bool'>) –

Return type

Any

async ctc.protocols.curve_utils.async_get_meta_pools(start_block=None, end_block=None, provider=None, verbose=False)
Parameters
  • 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]) –

  • provider (Union[str, PartialProvider, Provider, NoneType]) –

  • verbose (<class 'bool'>) –

Return type

Any

async ctc.protocols.curve_utils.async_get_plain_pools(start_block=None, end_block=None, provider=None, verbose=False)
Parameters
  • 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]) –

  • provider (Union[str, PartialProvider, Provider, NoneType]) –

  • verbose (<class 'bool'>) –

Return type

Any

async ctc.protocols.curve_utils.async_get_pool_metadata(pool, n_tokens=None, provider=None)
Parameters
  • pool (Address) –

  • n_tokens (int | None) –

  • provider (ProviderSpec) –

Return type

CurvePoolMetadata

async ctc.protocols.curve_utils.async_get_pool_state(pool, n_tokens=None, block=None, provider=None, normalize=True)
Parameters
  • pool (Address) –

  • n_tokens (int | None) –

  • block (BlockNumberReference | None) –

  • provider (ProviderSpec) –

  • normalize (bool) –

Return type

dict

async ctc.protocols.curve_utils.async_get_virtual_price(pool, provider=None, block=None)
Parameters
  • pool (Address) –

  • provider (ProviderSpec) –

  • block (BlockNumberReference | None) –

Return type

int