routePlan object is returned on every successful /quote and /execute call. It’s the canonical description of what the swap will do, broken down by route and leg.
You don’t need to construct a RoutePlan yourself. The API generates it; this page is for callers who want to display its contents in detail or audit a swap before signing.
Top-level shape
gasEstimate
feeBreakdown
Routes
routes[] is an array of SplitRoute. Each route is one path through the venue graph. When the optimizer splits a trade, you’ll see multiple entries with the input divided across them.
RouteLeg
data shapes (by kind)
The data object is a tagged union keyed by kind. The router’s adapter for each venue knows how to consume the corresponding shape.
These details exist mainly for debugging and auditing. Application code rarely needs to inspect them.
