y.prices.eth_derivs package

Submodules

y.prices.eth_derivs.creth module

ASyncFunctiony.prices.eth_derivs.creth.get_price_creth(token: Union[str, hexbytes.main.HexBytes, ~AnyAddress, brownie.convert.datatypes.EthAddress, brownie.network.contract.Contract, int], block: Union[int, eth_typing.evm.BlockNumber, NoneType] = None, skip_cache: bool = <EnvironmentVariable[name=`YPRICEMAGIC_SKIP_CACHE`, type=bool, default_value=False, current_value=False, using_default=True]>) y.datatypes.UsdPrice[source]

Since get_price_creth is an ASyncFunctionSyncDefault, you can optionally pass sync=False or asynchronous=True to force it to return a coroutine. Without either kwarg, it will run synchronously.

Parameters:
Return type:

UsdPrice

y.prices.eth_derivs.creth.is_creth(token)[source]
Parameters:

token (str | HexBytes | AnyAddress | EthAddress | Contract | int)

Return type:

bool

y.prices.eth_derivs.wsteth module

class y.prices.eth_derivs.wsteth.wstEth[source]

Bases: ASyncGenericBase

__init__(asynchronous=False)[source]
Parameters:

asynchronous (bool)

Return type:

None

get_price[source]
Parameters:
Return type:

UsdPrice

y.prices.eth_derivs.wsteth.is_wsteth(address)[source]
Parameters:

address (str | HexBytes | AnyAddress | EthAddress | Contract | int)

Return type:

bool

Module contents