TradeRouting#

tradeexecutor.strategy.default_routing_options.TradeRouting class.

class TradeRouting[source]#

Bases: Enum

What trade routing should the strategy use.

  • These values can be given to trade_routing variable in a strategy.

  • Thus option hides the complexity of the actual routing logic form an average developer.

See also tradeexecutor.ethereum.routing_data for actual routing data implementation.

__init__()#

Attributes

pancakeswap_busd

Two or three-legged trades on PancakeSwap.

pancakeswap_usdc

Two or three-legged trades on PancakeSwap.

quickswap_usdc

Two or three legged trades on Quickswap

uniswap_v2_usdc

Two or three legged trades on Uniswap v2 on Ethereum mainnet

user_supplied_routing_model

Use user supplied routing model

pancakeswap_busd = 'pancakeswap_busd'#

Two or three-legged trades on PancakeSwap.

  • Open positions with BUSD quote token.

  • Open positions with WBNB quote token.

pancakeswap_usdc = 'pancakeswap_usdc'#

Two or three-legged trades on PancakeSwap.

  • Open positions with USDC quote token.

  • Open positions with WBNB quote token.

quickswap_usdc = 'quickswap_usdc'#

Two or three legged trades on Quickswap

  • Open positions with USDC quote token.

  • Open positions with WMATIC quote token.

uniswap_v2_usdc = 'uniswap_v2_usdc'#

Two or three legged trades on Uniswap v2 on Ethereum mainnet

  • Open positions with USDC quote token.

  • Open positions with WETH quote token.

user_supplied_routing_model = 'user_supplied_routing_model'#

Use user supplied routing model

The routing table is constructed by the developer in the Python code.

Mostly useful for unit testing.