Get started with Solana RPC node using nolimitnodes.com

NoLimitNodes is a powerful service that offers REST APIs and Websockets for interacting with the Solana blockchain. Whether you’re a beginner exploring Solana or a seasoned developer, NoLimitNodes provides an easy-to-use interface to access real-time blockchain data. This guide will walk you through setting up and using NoLimitNodes for your Solana-based projects.

1. Getting Started with NoLimitNodes

Before you can start using NoLimitNodes, you need to set up an account and generate an API key. Here’s a quick overview of the process:

Go to the NoLimitNodes dashboard.

Generate an API key if you haven’t done so already.

You will receive two links:

  • REST APIhttps://api.nolimitnodes.com/solana?api_key=xxx
  • WebSocketwss://api.nolimitnodes.com/solana?api_key=xxx

Keep your API key secure and do not expose it in public code or repositories.

2. Using the REST API

Request Example:

curl -X POST 'https://api.nolimitnodes.com/solana?api_key=xxx' \
 -H 'Content-Type: application/json' \
 -d '{
   "id": 1,
   "jsonrpc": "2.0",
   "method": "getEpochInfo"
}'

Response Example:

{
    "jsonrpc": "2.0",
    "result": {
        "absoluteSlot": 307196285,
        "blockHeight": 285572434,
        "epoch": 711,
        "slotIndex": 44285,
        "slotsInEpoch": 432000,
        "transactionCount": 347697747950
    },
    "id": 1
}

The above request fetches epoch information from the Solana network, providing details like the current epoch, block height, and the number of slots within that epoch. For more examples and detailed documentation, check the official NoLimitNodes documentation.

3. Using the WebSocket API

NoLimitNodes also provides a WebSocket API, which is useful for real-time updates and streaming data. You can use this to receive events directly from the Solana blockchain. Here’s how you can use it:

Socket Connect

To connect to the WebSocket and listen for events, you’ll need to use a WebSocket client library like websockets for Python. Here’s a simple example.

import asyncio
import websockets
import json

async def connect_to_socket():
    async with websockets.connect('wss://api.nolimitnodes.com/solana?api_key=xxx') as websocket:
        # Subscribe to logs subscription event
        await websocket.send(json.dumps({
            "jsonrpc": "2.0",
            "id": 1,
            "method": "logsSubscribe",
            "params": [
                {
                    "mentions": [
                        "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P" # target account address (pump.fun)
                    ]
                },
                {
                    "commitment": "finalized"
                }
            ]
        }))

        while True:
            message = await websocket.recv()
            print(f"Received message: {message}")

asyncio.run(connect_to_socket())

Socket Response:


Received message: {"jsonrpc":"2.0","result":131089,"id":1}
Received message: {"jsonrpc":"2.0","method":"logsNotification","params":{"result":{"context":{"slot":307199168},"value":{"signature":"4mVmSvqxP3vMsPAnLpwo8sdNXCz9P9E5VfBaejW5XiEv2k8tP1voMJ97jHYAm6TwyNsoT23BHtq2PVNEbrhMvPU5","err":null,"logs":["Program ComputeBudget111111111111111111111111111111 invoke [1]","Program ComputeBudget111111111111111111111111111111 success","Program ComputeBudget111111111111111111111111111111 invoke [1]","Program ComputeBudget111111111111111111111111111111 success","Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL invoke [1]","Program log: CreateIdempotent","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]","Program log: Instruction: GetAccountDataSize","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1569 of 141295 compute units","Program return: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA pQAAAAAAAAA=","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success","Program 11111111111111111111111111111111 invoke [2]","Program 11111111111111111111111111111111 success","Program log: Initialize the associated token account","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]","Program log: Instruction: InitializeImmutableOwner","Program log: Please upgrade to SPL Token 2022 for immutable owner support","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1405 of 134708 compute units","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]","Program log: Instruction: InitializeAccount3","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4188 of 130826 compute units","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success","Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL consumed 23345 of 149700 compute units","Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL success","Program BSfD6SHZigAfDWSjzD5Q41jw8LmKwtmjskPH9XW1mrRW invoke [1]","Program log: Instruction: PumpBuy","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P invoke [2]","Program log: Instruction: Buy","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]","Program log: Instruction: Transfer","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4645 of 81002 compute units","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success","Program 11111111111111111111111111111111 invoke [3]","Program 11111111111111111111111111111111 success","Program 11111111111111111111111111111111 invoke [3]","Program 11111111111111111111111111111111 success","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P invoke [3]","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P consumed 2003 of 68914 compute units","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P success","Program data: vdt/007mYe7vni0Y3HOmbSJC8omPPDs8SozaJdCIQMmNMUndPgb8b8XzolcAAAAA7aRIYiolAAABOIcGSKDiS7MC+BPzjFpQtnY9LZb/h0OkbdQvlI2BJ9ySC1xnAAAAAF4NyBgIAAAAdaQgEOBJAwBeYaQcAQAAAHUMDsROSwIA","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P consumed 43461 of 108647 compute units","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P success","Program 11111111111111111111111111111111 invoke [2]","Program 11111111111111111111111111111111 success","Program BSfD6SHZigAfDWSjzD5Q41jw8LmKwtmjskPH9XW1mrRW consumed 64332 of 126355 compute units","Program BSfD6SHZigAfDWSjzD5Q41jw8LmKwtmjskPH9XW1mrRW success","Program 11111111111111111111111111111111 invoke [1]","Program 11111111111111111111111111111111 success"]}},"subscription":131089}}
Received message: {"jsonrpc":"2.0","method":"logsNotification","params":{"result":{"context":{"slot":307199168},"value":{"signature":"5ZtAiTZk4fp1gv8UdXoebN6zhkeE1gikQRzdNgbtbKybUvsu3yRAvgzU477BSi5D4CNegC5Gmap26h7cPf2MaeKu","err":null,"logs":["Program ComputeBudget111111111111111111111111111111 invoke [1]","Program ComputeBudget111111111111111111111111111111 success","Program ComputeBudget111111111111111111111111111111 invoke [1]","Program ComputeBudget111111111111111111111111111111 success","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P invoke [1]","Program log: Instruction: Sell","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]","Program log: Instruction: Transfer","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4645 of 13469 compute units","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P invoke [2]","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P consumed 2003 of 5339 compute units","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P success","Program data: vdt/007mYe6LLgf/8UglPDo1BzbCIWxaLglw1QU2SvCuHU80QlxS3wHo7GUAAAAAAADz3qcrAAAAT0PtN2jG/xFfX7j9n7Poz6CNQrmv3iG8ELAHwe3PPDmSC1xnAAAAAHIxJbAHAAAATaBBKKJ2AwByhQG0AAAAAE0IL9wQeAIA","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P consumed 31918 of 33528 compute units","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P success"]}},"subscription":131089}}
Received message: {"jsonrpc":"2.0","method":"logsNotification","params":{"result":{"context":{"slot":307199168},"value":{"signature":"37XZJs8ZNK7KmYtTmKm1aYYJ1puCTuuRRdCRxLrPaZ7ETyqz1foqk9jRDq2xvCbQopkWuiEcQAfbgfGjpv4AKJtQ","err":null,"logs":["Program ComputeBudget111111111111111111111111111111 invoke [1]","Program ComputeBudget111111111111111111111111111111 success","Program ComputeBudget111111111111111111111111111111 invoke [1]","Program ComputeBudget111111111111111111111111111111 success","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P invoke [1]","Program log: Instruction: Sell","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]","Program log: Instruction: Transfer","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4645 of 281141 compute units","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P invoke [2]","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P consumed 2003 of 273011 compute units","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P success","Program data: vdt/007mYe45jktOv8WjKQPx3/rvsL1pqXMsXHOlBS7RBwg2xV1nj78cgAMAAAAAOPweIecBAAAAsqHJL+d5ddJWK4t9Zp9ndVn69URNKD2ANfrK99W+7pqSC1xnAAAAAB9w7f0GAAAAvRmgs+nOAwAfxMkBAAAAAL2BjWdY0AIA","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P consumed 30418 of 299700 compute units","Program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P success","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1]","Program log: Instruction: CloseAccount","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 2916 of 269282 compute units","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success","Program 11111111111111111111111111111111 invoke [1]","Program 11111111111111111111111111111111 success","Program 11111111111111111111111111111111 invoke [1]","Program 11111111111111111111111111111111 success"]}},"subscription":131089}}

In this script, we are subscribing to the logs subscription event which sends a message whenever a new logs is finalized on the Solana network. The loop listens for and prints out incoming messages.

4. Best Practices

  • Secure your API key: Do not expose your API key in public code repositories or applications.
  • Use the appropriate methods: Make sure to use the NoLimitNodes REST and WebSocket APIs according to the official documentation to avoid rate limits and ensure stable performance.
  • Test with a small subset of data: Initially, test API requests and WebSocket connections with a small subset of data to verify functionality without risking performance issues.

For further details and examples, visit the official NoLimitNodes documentation.

NoLimitNodes offers a straightforward way to interact with the Solana network, whether for querying data via REST APIs or receiving real-time updates with WebSockets. By following this guide, you can effectively integrate NoLimitNodes into your Solana-based applications, making blockchain data more accessible and manageable for your development needs.