In order to preserve pathfinder performance and to prevent unnecessarily deep searches, we have defined several parameter ranges for the route request object.
chain_id
You must submit a chain_id parameter in number format with your query -- this includes single-chain protocols. For multi-chain protocols, you may change your chain_id to route through your protocols' pools on the corresponding chain. You do not have to change your DEX ID.
Requests for routes via a chain on which you have no pools will result in a HTTP error 469: No Route Found.
amount_in
amount_in must be a hex-string formatted integer value of max uint128.
token_in
token_in must be a valid token for the chain_id submitted along with the request.
Requests for routes with invalid tokens will result in a HTTP error 469: No Route Found.
token_out
token_out must be a valid token for the chain_id submitted along with the request.
Requests for routes with invalid tokens will result in a HTTP error 469: No Route Found.
max_hops
For performance reasons, max_hops is capped at 4 for most networks.
Requests for routes with max_hops too high will result in HTTP error 403: Forbidden.
min_splits
min_splits must be smaller than max_splits.
Requests for routes with min_splits larger than max_splits will result in HTTP error 403: Forbidden.
max_splits
For performance reasons, max_splits is capped at 4 for most networks.
Requests for routes with max_splits too high will result in HTTP error 403: Forbidden.
count
While a count value must be passed along with the JSON object, the parameter is currently unused internally and the route request will return a single route regardless of count.