translate_to_naive_swap#
API documentation for tradeexecutor.ethereum.execution.translate_to_naive_swap Python function.
- translate_to_naive_swap(web3, deployment, hot_wallet, t, gas_fees, base_token_details, quote_token_details)[source]#
Creates an AMM swap tranasction out of buy/sell.
If buy tries to do the best execution for given planned_reserve.
If sell tries to do the best execution for given planned_quantity.
Route only between two pools - stablecoin reserve and target buy/sell.
Any gas price is set by web3 instance gas price strategy.
- Parameters:
t (TradeExecution) –
web3 (Web3) –
deployment (UniswapV2Deployment) –
hot_wallet (HotWallet) –
gas_fees (GasPriceSuggestion) –
base_token_details (TokenDetails) –
quote_token_details (TokenDetails) –
- Returns:
Unsigned transaction