prepare_swaps#
API documentation for tradeexecutor.ethereum.execution.prepare_swaps Python function.
- prepare_swaps(web3, hot_wallet, uniswap, ts, state, instructions, underflow_check=True)[source]#
- Prepare multiple swaps to be breoadcasted parallel from the hot wallet. - Parameters:
- underflow_check – Do we check we have enough cash in hand before trying to prepare trades. Note that because when executing sell orders first, we will have more cash in hand to make buys. 
- web3 (Web3) – 
- hot_wallet (HotWallet) – 
- uniswap (UniswapV2Deployment) – 
- ts (datetime) – 
- state (State) – 
- instructions (List[TradeExecution]) – 
 
- Returns:
- Token approvals we need to execute the trades 
- Return type: