Skip to main content

Route

createRoute#

Constructs and validates a Route

createRoute(
pools: Pool[]! # The ordered list of pools from which to construct the route
inToken: Token! # The input token
outToken: Token! # The output token
): Route!

routeChainId#

Returns the chain id of the tokens in the route

routeChainId(
route: Route!
): ChainId!

routeMidPrice#

Returns the mid price of the route

routeMidPrice(
pools: Pool[]! # The ordered list of pools from which to calculate the mid price
inToken: Token! # The input token
outToken: Token! # The output token
): Price!