We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Here is an example of listening for all new transactions:
api.connect().then(() => { api.connection.on('transaction', (event) => { // Do something useful with `event` console.log(JSON.stringify(event, null, 2)) }) api.request('subscribe', { streams: [ 'transactions' ] }).then(response => { // response.status was already checked internally by ripple-lib // response is always an empty object {} in this case console.log('Successfully subscribed') }).catch(error => { // Handle `error` }) })