> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validationcloud.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ripple_path_find

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](/nodeapi/about/billing).

***

## Reference: [Here](https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/ripple_path_find)

## **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.

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
  "result": {
    "alternatives": [
      {
        "paths_canonical": [],
        "paths_computed": [
          [
            {
              "currency": "524C555344000000000000000000000000000000",
              "issuer": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De",
              "type": 48
            }
          ]
        ],
        "source_amount": "659280"
      }
    ],
    "destination_account": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De",
    "destination_amount": {
      "currency": "524C555344000000000000000000000000000000",
      "issuer": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De",
      "value": "1"
    },
    "destination_currencies": [
      "524C555344000000000000000000000000000000",
      // ...
    ],
    "full_reply": true,
    "ledger_hash": "3FF4EFB0A896061499DCE559C21A44563F74C040226019033B06BA6FC383B450",
    "ledger_index": 107292935,
    "source_account": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De",
    "validated": true,
    "status": "success"
  },
  "status": "success",
  "type": "response",
  "forwarded": true
}
```

<CodeGroup>
  ```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
      -X POST \
      -H "Content-Type: application/json" \
      -d '{"method":"ripple_path_find","params":[{"source_account":"rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De","destination_account":"rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De","destination_amount":{"currency":"524C555344000000000000000000000000000000","issuer":"rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De","value":"1"},"source_currencies":[{"currency":"XRP"}],"ledger_index":"validated"}]}'
  ```
</CodeGroup>

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>`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.