Find Routes (Legacy)
Legacy quote-only endpoint. Available for compatibility; planned for future deprecation.
Planned future deprecation: this legacy quote endpoint remains available for compatibility; no removal date is announced. New integrations should use GET /router/swap/allowance, or GET /router/swap/permit2 then POST /router/swap/permit2/build. Migration guide: https://docs.peach.ag/documentation/bsc/aggregator/editor/migration-guide. Price-only exact-input route lookup. Does not approve tokens, build calldata or broadcast a transaction. For native BNB, route using WBNB. Send by_amount_in=true for the documented v7 flow. The same route also accepts POST JSON in the backend; this reference documents the GET workflow used by the SDK.
Input ERC20 token address. Use WBNB for native BNB routing.
0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095cPattern: ^0x[0-9a-fA-F]{40}$Output ERC20 token address; must differ from from. Use WBNB for native BNB routing.
0x55d398326f99059fF775485246999027B3197955Pattern: ^0x[0-9a-fA-F]{40}$Positive unsigned integer, at most 2^128 - 1, in input-token base units for the documented exact-input flow. Send decimal digits, never a human-readable fractional amount.
10000000000000000Pattern: ^[0-9]+$Use true for the documented exact-input v7 workflow. Omission defaults to true. A legacy false flag can be parsed by the server but does not establish supported exact-output behavior.
trueExample: truePossible values: Maximum route hops. Omission or 0 uses the service routing configuration; values above its maximum are rejected.
3Requested split count. Omission or 0 uses the configured maximum; the service can reduce it for trade size and metadata availability.
20Comma-separated provider identifiers from Get Status. Omit to use the enabled provider set; availability and version filters still apply.
PANCAKEV3,PANCAKEV2Client version. Required and must be at least 1001500 for find_routes; this is not the SDK package version.
1001500Optional gas limit override. Prefer the service estimate unless you have measured the complete execution path.
Optional advanced path-calculation limit; behavior follows the service routing configuration.
Optional integrator identifier used for service engine/provider selection. It appears in URL logs and is not a secret authentication token.
Application success (code=200) or application error (code!=200). Business errors may still have HTTP status 200; inspect the JSON code.
Malformed query or request rejected by HTTP extraction. Body may be plain text rather than an application envelope.
Unhandled service failure.
Service-wide rate limit / circuit breaking. Retry with backoff.
curl --fail-with-body --silent --show-error --get \
'https://api.peach.ag/router/find_routes' \
--data-urlencode 'from=0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c' \
--data-urlencode 'target=0x55d398326f99059fF775485246999027B3197955' \
--data-urlencode 'amount=1000000000000000' \
--data-urlencode 'by_amount_in=true' \
--data-urlencode 'v=1001500'
{
"code": 200,
"msg": "Success",
"data": {
"request_id": "0xbc336e687d684a3da33449abb5fc734900000000000000000000000000000000",
"quote_ts": 1791614940641,
"amount_in": "1000000000000000",
"amount_out": "755485967408532178",
"deviation_ratio": "0.01074628",
"paths": [
{
"pool": "0xc223159b68224ab0756a57950cd5683dc380f53d12b5928ce77bfc342a85e992",
"provider": "UNISWAPV4",
"adapter": "0x30d87d5DF59f0609088567181B9DBAe66DF32cac",
"token_in": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
"token_out": "0xb3ed0a426155b79b898849803e3b36552f7ed507",
"direction": true,
"fee_rate": "0.01099",
"amount_in": "1000000000000000",
"amount_out": "347536111619144724",
"extra_data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b3ed0a426155b79b898849803e3b36552f7ed507000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000c80000000000000000000000000000000000000000000000000000000000000000"
},
{
"pool": "0xbfd6abd308e0d8acaa7072c719ae7e2482b838fd7f36100b59b3a5ac3227b1d2",
"provider": "PANCAKE_INFINITY_CL",
"adapter": "0xb433Aa5f3E54c670006FaABc24e40e398e32d8cc",
"token_in": "0xb3ed0a426155b79b898849803e3b36552f7ed507",
"token_out": "0x1fa4a73a3f0133f0025378af00236f3abdee5d63",
"direction": false,
"fee_rate": "0.0008",
"amount_in": "347536111619144724",
"amount_out": "145756880181053769",
"extra_data": "0xbfd6abd308e0d8acaa7072c719ae7e2482b838fd7f36100b59b3a5ac3227b1d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
},
{
"pool": "0xce6326fc06c2f3967884e5578bb33d0f30b63a33",
"provider": "PANCAKEV3",
"adapter": "0x2896fF690132531fE4F16D23Bd35f47c2ea36d34",
"token_in": "0x1fa4a73a3f0133f0025378af00236f3abdee5d63",
"token_out": "0x55d398326f99059ff775485246999027b3197955",
"direction": true,
"fee_rate": "0.0025",
"amount_in": "145756880181053769",
"amount_out": "755485967408532178"
}
],
"contracts": {
"router": "0xF2B877A2F415efB0Ad5f15d82652564528C1fd2a",
"execution_router": "0x1F131D5A0f765890693A0E1480f69b2de2c1b568"
},
"gas": 500000
}
}Usage notes
This quote-only endpoint remains available for compatibility and is planned for future deprecation. No removal date is announced. Use the swap endpoints for new integrations; see the Migration Guide.
Check both the HTTP status and JSON code. See Error Codes for recovery guidance. Invalid query or body extraction may return plain text instead of the JSON envelope.
Last updated
Was this helpful?