uniswap_v2_routing#

tradeexecutor.ethereum.uniswap_v2_routing module.

Module description#

Route trades to different Uniswap v2 like exchanges.

Classes#

UniswapV2RoutingState

Manage transaction building for multiple Uniswap trades.

UniswapV2SimpleRoutingModel

A simple router that does not optimise the trade execution cost.

Functions#

get_uniswap_for_pair(web3, ...)

Get a router for a trading pair.

route_tokens(trading_pair, intermediate_pair)

Convert trading pair route to physical token addresses.