Tutorials
First Steps
Connect to a public Honeycluster endpoint and fetch your first ledger.

In this short tutorial you'll make your first request against a public Honeycluster endpoint and inspect the response.

1. Pick an endpoint
##

Use the main public endpoint for mainnet:

wss://9f21fd99-7552e74b.sandblocks.dev/proxy/xrpl-ws
2. Subscribe to ledgers
##
TypeScript
import { Client } from 'xrpl'

const client = new Client('wss://9f21fd99-7552e74b.sandblocks.dev/proxy/xrpl-ws')
await client.connect()

client.on('ledgerClosed', (ledger) => {
  console.log('New ledger', ledger.ledger_index)
})

await client.request({ command: 'subscribe', streams: ['ledger'] })
3. Clean up
##
TypeScript
await client.disconnect()

That's it — you're now receiving live ledger notifications from Honeycluster.