buy_tokens
Documentation for eth_defi.vault.mass_buyer.buy_tokens function.
- buy_tokens(web3, user, portfolio, denomination_token, intermediary_tokens, quoters, multicall=None, block_identifier=None, multicall_gas_limit=10000000, buy_func=<function _default_buy_function>, uniswap_v2=None, uniswap_v3=None, multicall_batch_size=5)[source]
Buy bunch of tokens on the wish list.
User for testing
Automatically resolve the routes with the best quote
- Parameters
web3 (web3.main.Web3) –
user (eth_typing.evm.HexAddress) –
portfolio (eth_defi.vault.base.VaultPortfolio) –
denomination_token (Union[eth_typing.evm.HexAddress, eth_defi.token.TokenDetails]) –
intermediary_tokens (set[Union[eth_typing.evm.HexAddress, eth_defi.token.TokenDetails]]) –
quoters (set[eth_defi.vault.valuation.ValuationQuoter]) –
block_identifier (Optional[Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, int]]) –
uniswap_v2 (Optional[eth_defi.uniswap_v2.deployment.UniswapV2Deployment]) –
uniswap_v3 (Optional[eth_defi.uniswap_v3.deployment.UniswapV3Deployment]) –
multicall_batch_size (int) –
- Return type