POSTripple_path_find

XRP Ledger Mainnethttps://xrpl-mainnet.nodit.io/

Returns a payment path between two accounts in a single request. It is a simplified version of path_find whose response can be used for a payment right away.

Request Body
methodstringrequired
source_accountstringrequired

The account sending the funds.

destination_accountstringrequired

The account receiving the funds.

destination_amountstringrequired

Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.

An XRP amount in drops. 1 XRP equals 1,000,000 drops.

source_currenciesobject[]

The currencies the source may spend. Up to 18 can be specified, and when omitted the server explores up to 88 pairs automatically.

currencystring

The currency code. Pass XRP for XRP.

issuerstring

The address of the account that issued the token. Omit for XRP.

send_maxstring

Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.

An XRP amount in drops. 1 XRP equals 1,000,000 drops.

domainstring

The ledger entry ID of the permissioned domain. It can be used only when the PermissionedDEX amendment is enabled.

ledger_hashstring

The hash of the ledger version to use. Pass a 32-byte hex string.

ledger_indexinteger

Specifies the ledger version to use. Pass a ledger index as an integer, or use one of the shortcut strings below.

  • validated: Uses the most recent ledger version validated by the network.
  • closed: Uses the most recent ledger version the server has closed. It may not be validated.
  • current: Uses the in-progress ledger version the server is currently building.

The ledger index of the version to use.

Responses
paths_computedobject[][]

The list of step arrays that make up the payment paths.

source_amountoneOf

Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.

XRP Amountstring
Token Amountobject
currencystring

The currency code. Either a 3-character code or a 40-character hex string.

issuerstring

The address of the account that issued the token.

valuestring

The amount expressed as a string.

destination_amountoneOf

Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.

XRP Amountstring
Token Amountobject
currencystring

The currency code. Either a 3-character code or a 40-character hex string.

issuerstring

The address of the account that issued the token.

valuestring

The amount expressed as a string.

destination_accountstring

The destination account address from the request.

destination_currenciesstring[]

The list of currency codes the destination account can receive.

ledger_current_indexinteger

The ledger index of the version used.

validatedboolean

Whether the response was derived from a validated ledger version.

X-API-KEY
RequestCU150
cURL
curl -X POST "https://xrpl-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "method": "ripple_path_find",
  "params": [
    {
      "source_account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
      "destination_account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
      "destination_amount": {
        "currency": "USD",
        "issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
        "value": "0.001"
      }
    }
  ]
}'
Response
Example · 200
{
  "result": {
    "alternatives": [
      {
        "paths_computed": [
          [
            {
              "currency": "USD",
              "issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
              "type": 48
            },
            {
              "account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
              "type": 1
            }
          ]
        ],
        "source_amount": "256987"
      }
    ],
    "destination_account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
    "destination_currencies": [
      "USD",
      "XRP"
    ],
    "ledger_current_index": 98765433,
    "validated": false
  }
}