presign_and_execute_cowswap
Documentation for eth_defi.erc_4626.vault_protocol.lagoon.cowswap.presign_and_execute_cowswap function.
- presign_and_execute_cowswap(asset_manager_wallet, vault, buy_token, sell_token, amount_in, min_amount_out, broadcast_callback=<function _default_broadcast_callback>, api_timeout=datetime.timedelta(seconds=60), trade_timeout=datetime.timedelta(seconds=600))
Creates a sell order from the vault and executes it on CowSwap.
Blocks until the order is completed or failed or timed out.
- Raise
Various exceptions from broadcasting and order execution fails/timeouts..
- Parameters
asset_manager_wallet (eth_defi.hotwallet.HotWallet) –
vault (eth_defi.erc_4626.vault_protocol.lagoon.vault.LagoonVault) –
buy_token (eth_defi.token.TokenDetails) –
sell_token (eth_defi.token.TokenDetails) –
amount_in (decimal.Decimal) –
min_amount_out (decimal.Decimal) –
broadcast_callback (Callable[[web3.main.Web3, Any, web3.contract.contract.ContractFunction], hexbytes.main.HexBytes]) –
trade_timeout (datetime.timedelta) –
- Return type