Ripple account_info (specific Ledger)
const websocket = require('websocket')
const RippleClient = require('rippled-ws-client')
new RippleClient('wss://s2.ripple.com').then(connection => {
connection.send({
command: 'account_info',
account: 'rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY',
ledger_index: 35664185
}).then(response => {
console.log('XRP Balance', parseInt(response.account_data.Balance) / 1000000) // Convert drops to XRP
connection.close()
})
}).catch(console.log)
no comments