ripple_path_find - XRPL
Example code for the ripple_path_find JSON RPC method. Complete guide to using ripple_path_find JSON-RPC in the GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request Example
curl --location --request POST 'https://xrp.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "ripple_path_find",
"params": [{
"source_account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"destination_amount": {
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"value": "100"
}
}],
"id": "getblock.io"
}'const axios = require('axios');
const url = 'https://xrp.getblock.io/mainnet/';
const headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
};
const payload = {
jsonrpc: '2.0',
method: 'ripple_path_find',
params: [{
source_account: 'rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH',
destination_account: 'ra5nK24KXen9AHvsdFTKHSANinZseWnPcX',
destination_amount: {
currency: 'USD',
issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B',
value: '100'
}
}],
id: 'getblock.io'
};
axios.post(url, payload, { headers })
.then(response => console.log(response.data))
.catch(error => console.error(error));Response Example
Returns
Field
Type
Description
Use Cases
SDK Integration
xrpl.js
Last updated
Was this helpful?