Skip to main content

ripple_path_find RPC Method

Simplified version of the path_find method that provides a single response with a payment path which can be used right away

Updated on
Oct 4, 2023

ripple_path_find RPC Method

Parameters

destination_account
string
REQUIRED
The unique address of the account that would receive funds in a transaction
destination_amount
object
REQUIRED
The amount that the destination account will recieve. It contains the following fields:
currency
string
The currency of the destination amount
issuer
string
The issuer of the currency
value
string
The value of the destination amount
source_account
string
REQUIRED
The unique address of the account that would send funds in a transaction
source_currencies
array
An array of currencies that the source account might want to spend
currency
string
The currency of the source amount
send_max
string
The currency Amount that would be spent in the transaction
ledger_hash
string
A 20-byte hex string for identifying the ledger version
ledger_index
string
The index of the ledger to retrieve information from

Returns

result
object
An object which contains the following fields:
alternatives
array
An array of objects with possible paths to take
destination_account
string
The unique address of the account that would receive a payment transaction
destination_amount
object
The currency Amount that the destination account would receive in a transaction
currency
string
The currency of the destination amount
issuer
string
The issuer of the currency
value
string
The value of the destination amount
destination_currencies
string
An array of strings representing the currencies that the destination accepts, as 3-letter codes like USD or as 40-character hex like 015841551A748AD2C1F76FF6ECB0CCCD00000000
full_reply
boolean
If true, then this is the best path that network can find as of the current ledger
source_account
string
The source account
status
string
The status of the request
warnings
array
An array of warning objects, each containing the following fields:
id
integer
The ID of the warning
message
string
The warning message
Request
1
curl https://docs-demo.xrp-mainnet.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{
5
"method": "ripple_path_find",
6
"params": [
7
{
8
"destination_account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
9
"destination_amount": {
10
"currency": "USD",
11
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
12
"value": "0.001"},
13
"source_account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
14
"source_currencies": [{"currency": "XRP"},
15
{"currency": "USD"}]
16
}],"id":1,"jsonrpc":"2.0"}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free