FindPath
FindPath finds and validates a route between two chains Supports human-readable denoms (e.g., "uatone") or IBC denoms
/v1.PathfinderService/FindPathConnect-Protocol-Version*1Define the version of the Connect protocol
1Connect-Timeout-Ms?Connect-Timeout-MsDefine the timeout, in ms
- body
FindPathRequest - Find a route between chains
For token_from_denom and token_to_denom, you can use:
- Human-readable/native denom (e.g., "uatone", "uosmo", "ustars")
- Full IBC denom (e.g., "ibc/ABC123...")
- "symbol@origin_chain" convenience syntax (e.g., "uatone@atomone-1"), which disambiguates a base denom by naming the chain it's native to - useful when the same base denom could otherwise resolve ambiguously.
The pathfinder will automatically resolve human-readable denoms. If token_to_denom is empty, the pathfinder assumes you want the same token on the destination chain (useful for bridging without swapping).
chainFrom*chain_fromSource chain ID (e.g., "osmosis-1", "atomone-1")
tokenFromDenom*token_from_denomToken denom on source chain. Accepts a native denom (e.g., "uatone"), an IBC denom (e.g., "ibc/..."), or "symbol@origin_chain" (e.g., "uatone@atomone-1") to disambiguate by origin chain.
1 <= length <= 128amountIn*amount_inAmount to transfer/swap (in base units)
chainTo*chain_toDestination chain ID
tokenToDenom?token_to_denomToken denom you want to receive on destination chain. Accepts the same forms as token_from_denom (native, IBC, or "symbol@origin_chain"). If empty, assumes same token as token_from (bridging without swap)
length <= 128senderAddress*sender_addressSender address on source chain
38 <= length <= 68receiverAddress*receiver_addressReceiver address on destination chain
38 <= length <= 68smartRoute?smart_routeIf true, return a smart route, if false, return a normal route
slippageBps?slippage_bpsSlippage in basis points (e.g., 100 = 1%, 1000 = 10%) Must be less than 10000
0 <= value <= 10000Success
- response
success?successerror_message?error_messagebroker_swap*BrokerSwapRoute represents a route involving a swap on a broker chain. Supports various scenarios:
- Same-chain swap: inbound_leg absent, outbound_legs=[] (e.g., osmosis ATOM -> osmosis OSMO)
- Swap from broker: inbound_leg absent (e.g., osmosis USDC -> juno JUNO)
- Standard 3-chain: inbound_leg set, len(outbound_legs)=1
- Multi-hop outbound: inbound_leg set, len(outbound_legs)>1 (e.g., cosmos ATOM -> swap -> noble -> juno)
curl -X POST 'https://example.com/v1.PathfinderService/FindPath' \ -H 'Connect-Protocol-Version: 1' \ -H 'Content-Type: application/json' \ -d '{ "chainFrom": "string", "tokenFromDenom": "string", "amountIn": "string", "chainTo": "string", "senderAddress": "stringstringstringstringstringstringst", "receiverAddress": "stringstringstringstringstringstringst"}'{ "success": true, "error_message": "string", "broker_swap": { "path": [ "string" ], "inbound_legs": [ { "from_chain": "string", "to_chain": "string", "channel": "string", "port": "string", "token": { "chain_denom": "string", "base_denom": "string", "origin_chain": "string", "is_native": true }, "amount": "string" } ], "swap": { "broker": "string", "token_in": { "chain_denom": "string", "base_denom": "string", "origin_chain": "string", "is_native": true }, "token_out": { "chain_denom": "string", "base_denom": "string", "origin_chain": "string", "is_native": true }, "amount_in": "string", "amount_out": "string", "price_impact": "string", "effective_fee": "string", "osmosis_route_data": { "routes": [ { "pools": [ { "id": 0, "type": 0, "spread_factor": "string", "token_out_denom": "string", "taker_fee": "string", "liquidity_cap": "string" } ], "has_cw_pool": true, "out_amount": "string", "in_amount": "string" } ], "liquidity_cap": "string", "liquidity_cap_overflow": true } }, "outbound_legs": [ { "from_chain": "string", "to_chain": "string", "channel": "string", "port": "string", "token": { "chain_denom": "string", "base_denom": "string", "origin_chain": "string", "is_native": true }, "amount": "string" } ], "outbound_supports_pfm": true, "execution": { "memo": "string", "smart_contract_data": { "contract": "string", "msg": { "swap_and_action": { "user_swap": { "swap_exact_asset_in": { "swap_venue_name": "string", "operations": [ { "pool": "string", "denom_in": "string", "denom_out": "string", "interface": "string" } ] } }, "min_asset": { "native": { "amount": "string", "denom": "string" } }, "timeout_timestamp": 0, "post_swap_action": { "ibc_transfer": { "ibc_info": { "memo": "string", "receiver": "string", "recover_address": "string", "source_channel": "string" } } }, "affiliates": [ "string" ] } } }, "ibc_receiver": "string", "recover_address": "string", "min_output_amount": "string", "uses_wasm": true, "description": "string" } }}