routing_state#

tradeexecutor.ethereum.routing_state Python module in Trading Strategy framework.

Module description#

Route trades to different Uniswap v2 like exchanges.

Classes#

EthereumRoutingState

Manage transaction building for multiple Uniswap trades.

Functions#

get_base_quote(web3, target_pair, reserve_asset)

Get base and quote token from the pair and reserve asset.

get_base_quote_intermediary(web3, ...)

get_token_for_asset(web3, asset)

Get ERC-20 contract proxy.

route_tokens(trading_pair, intermediate_pair)

Convert trading pair route to physical token addresses.