Skip to main content
A simplified version of the path_find method that provides a single response with a payment path you can use right away. The server tries to find the cheapest path or combination of paths, but the paths returned are not guaranteed to be the best. This method will use 40 Compute Units.

Reference: Here

Parameters

  • source_account (string, required) The account that would send funds.
  • destination_account (string, required) The account that would receive funds.
  • destination_amount (currency amount, required) How much the destination account would receive. Specify "-1" (for XRP) or -1 as the value (for tokens) to request a path that delivers as much as possible.
  • domain (string, optional) The ledger entry ID of a permissioned domain. If provided, only return paths that use the corresponding permissioned DEX.
  • ledger_hash (string, optional) The unique hash of the ledger version to use.
  • ledger_index (number or string, optional) The ledger index of the ledger to use, or a shortcut string such as validated, closed or current.
  • send_max (currency amount, optional) Maximum amount that would be spent. Cannot be used with source_currencies.
  • source_currencies (array, optional) Currencies that the source account might want to spend. Each entry is an object with a mandatory currency field and optional issuer field.

Returns

  • alternatives (array) Possible paths to take. Each has paths_computed (array of arrays of path step objects) and source_amount (what the source would have to send along this path). If empty, there are no paths connecting the source and destination.
  • destination_account (string) The account that would receive a payment transaction.
  • destination_amount (currency amount) The amount requested.
  • destination_currencies (array) Currencies that the destination accepts, as 3-letter codes or 40-character hex.
  • source_account (string) The account that would send funds.
  • ledger_hash, ledger_index, validated The ledger version used for the search.
Over WebSocket, send {"id":1,"command":"ripple_path_find","source_account":"rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De","destination_account":"rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De","destination_amount":{"currency":"524C555344000000000000000000000000000000","issuer":"rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De","value":"1"},"source_currencies":[{"currency":"XRP"}],"ledger_index":"validated"} to wss://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE>.