Getting Started with Dedicated Nodes
Restricted to Institutional Clients Only
Working With Your Node
RPC and Websocket Each dedicated node comes with an RPC URL that you can use, as shown in the example below.
Here, we are using Solana web3.js to call getSlot
using our dedicated node:
// Using @solana/web3.js const { Connection } = require('@solana/web3.js');
const connection = new Connection('https://your-dedicated-rapidnode-rpc.com?api-key=YOUR_API_KEY');
// Get the current slot const getSlot = async () => { const slot = await connection.getSlot(); console.log('Current slot:', slot); };
getSlot();
This is how you would set up a native WebSocket connection to stream new slots:
const message = "hello world";
console.log(messageconst Websocket = require('ws'); const ws = new Websocket('wss://your-dedicated-rapidnode-rpc.com?api-key=YOUR_API_KEY');
ws.onopen = () => { ws.send(JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'slotSubscribe' })); };
ws.onmessage = (event) => { console.log(JSON.parse(event.data)); };
Set up your gRPC Plugin
To begin using the gRPC plugin, you need to clone the repo:
git clone https://github.com/rapidnode/yellowstone-grpc.git
Using the CLI
cd yellowstone-grpc/examples/rust/ cargo run --bin client -- -e "https://your-dedicated-rapidnode-rpc.com:2053" --x-token YOUR_API_TOKEN subscribe --slots
Once complete, you should see the terminal output new slots. Don't forget to replace the URL and Token with your own.

Last updated