OpenInfra.sh is now live - Solana infrastructure, included with every server. LEARN MORE HERE >

OpenInfra.shopeninfra.sh

Quickstart

From zero to your first Solana slot in under a minute.

  1. Find your endpoint

    Every OpenInfra server ships with a dedicated RPC endpoint. For testing you can use the shared public endpoint — your dashboard shows your server's dedicated URL once provisioned.

  2. Make your first request

    Fetch the current slot number using getSlot. Choose your language:

    import { Connection } from "@solana/web3.js"; const conn = new Connection("https://rpc.openinfra.sh", "confirmed");const slot = await conn.getSlot();console.log("Current slot:", slot);

    Expected response:

    { "jsonrpc": "2.0", "result": 312445981, "id": 1 }
  3. Subscribe over WebSockets

    Open a WebSocket connection to receive real-time slot updates without polling:

    const ws = new WebSocket("wss://rpc.openinfra.sh"); ws.onopen = () => {  ws.send(JSON.stringify({    jsonrpc: "2.0",    id: 1,    method: "slotSubscribe",  }));}; ws.onmessage = (ev) => {  const msg = JSON.parse(ev.data);  console.log("Slot:", msg.params?.result?.slot);};
  4. Next steps

    You're connected. Explore what's possible: