routing_data#
tradeexecutor.ethereum.routing_data Python module in Trading Strategy framework.
Module description#
Default routing models for Uniswap v2 like exchange.
Describe which smart contract addresses are used to make a trade. Map factory addresses, router addresses and quote token addresses.
This takes one of the default routing options and gives the routing model for it
The routing model consists of smart contract addresses needed to trade
Parameters needed for basic routing for an Uniswap v2 compatible exchange:
Factory smart contract address
Router smart contract address
Pair contract “init code hash”
Wrapped token address
Stablecoin addresses
Wrapped token/stablecoin pool address
See also tradeexecutor.strategy.default_routing_options.TradeRouting
that gives the users the choices for the trade routing options in their strategy module.
Classes#
Describe raw smart contract order routing data. |
Functions#
|
Create compatible routing. |
Set up Uniswap v2 compatible routing. |
|
Set up Uniswap v3 compatible routing. |
|
|
Get routing options for backtests. |
Generate routing using PancakeSwap v2 router. |
|
Generate routing using Trader Joe router. |
|
|
Create trade routing model for the strategy. |
Generate routing using Trader Joe router. |
|
Generate routing using Uniswap v2 router. |
|
Generate routing using Uniswap V3 router for Ethereum |
|
Generate routing using Uniswap V3 router for Polygon |
|
|
Assert that reserve currency matches routing type |