Mastery Series: How to Access Decentralised RPCs on the SubQuery Network

SubQuery Network
6 min readMay 20, 2024

Welcome to the next instalment of the SubQuery Mastery Series, where we help you navigate the SubQuery Network and ensure you maximise potential rewards. If you’re reading this article you may already be familiar with SubQuery and you’re interested in accessing decentralised RPCs.

If you want to comprehensively explore the SubQuery Network (more than what we explain here), you can visit our SubQuery Network Documentation. However, if you’re interested in our decentralised RPCs then you’re in the right place as we’ll cover all you need to know in this article.

First, a quick refresh on Remote Procedure Calls (RPCs). RPCs play a crucial role in enabling communication between different components of decentralised applications (DApps). SubQuery Network provides a robust platform for developers to build, deploy, and query data from various blockchain networks efficiently. In this guide, we will walk you through the process of accessing decentralised RPCs on the SubQuery Network app. If you need to understand RPCs better first, read our introduction article.

Where to find SubQuery Network RPCs?

To find the RPCs available on the SubQuery Network, you can head to our Network app and go to the Explorer, then use the toggle to switch to ‘RPC Endpoints’. Alternatively, you can go directly by clicking this link: https://app.subquery.network/explorer/home?category=rpc.

Behind these RPC endpoints is a network of independent RPC providers operating around the world in a decentralised, trustless, and unstoppable way.

Who’s running these RPCs?

The beauty of the SubQuery Network is our Node Operators who are RPC providers operating all over the globe in a completely decentralised, trustless, and unstoppable way. Anyone can join the network, link up an existing RPC node, and start serving requests for these endpoints.

From the Explorer, you can select the project (based on the network and node type you need) and then select the ‘RPC Providers’ tab to see how many Node Operators are running RPCs of this type.

Accessing the Endpoint of Your Choosing

Free Public Endpoint

There are two possible ways to access a chosen endpoint. Some (not all) endpoints have a free public endpoint. Where this is available, you can select ‘Get Endpoint’ and it will show the option for the Free Public Endpoint. By accessing public RPC endpoints, you agree to the SubQuery Foundation Free Public RPC terms of service.

Flex Plans

The other option which is available on all RPC endpoints, is our Flex Plan. You would likely opt for this option if there is no sponsored free public endpoint, or if you require a higher request limit than what the free endpoint provides.

Our Flex plan creation process is as streamlined as possible and is similar to any centralised alternative, it only takes a few minutes before you have an API key and a single production endpoint that you can query through.

Creating a Flex Plan

Flex plans are pay-as-you-go plans where you pay a specified rate per thousand requests. At the end of a Flex plan you receive an API endpoint with your own API key to protect it.

1. Choose Your Plan Type

After signing a request in your wallet, you will begin the Flex Plan creation process. You have the option to choose between Economy, Performance or make your own custom plans, each of these are summarised below.

Economy:

  • Cheaper
  • Less attractive to RPC providers
  • Less reliable
  • Lower global performance
  • Best used where costs are more important than reliability/performance

Performance:

  • More expensive
  • More attractive to RPC providers
  • Higher reliability
  • Higher global performance
  • Best used for production-level apps where reliability/performance is more important than cost

Custom:

  • Only for advanced users with a unique use case
  • Flexible — the price per thousand requests and maximum number of RPC providers is discretional
  • May be used in cases where a consumer wants to pay even more than the Performance plan to guarantee maximum RPC providers, where cost is not a concern

SubQuery will automatically allocate qualified Node Operators to your endpoint based on the price and performance you select.

2. Deposit to Billing Account

After choosing your Flex Plan type, you are required to deposit SQT to your Billing Account. Once your Billing Account is topped up, you authorise SubQuery to deduct Flex Plan payments from the account. It’s important not to let your billing account run out of SQT as your Flex plan will automatically be cancelled and your endpoint may stop working. Rest assured, you will receive notifications on the SubQuery Network app when your account balance is running low.

You can also easily withdraw unused SQT from this Billing Account at any time without any unlocking period.

3. Confirm

Once you’ve chosen your Flex Plan type and topped up your Billing Account, you will be prompted to sign and approve several transactions. Please follow the steps shown on the page to do so using your connected wallet. And voila, you have access to your decentralised RPC now!

View and Access Endpoint and API key

You can view your personalised endpoint and API key on the final step. This allows you to connect to the endpoint and make queries through SubQuery’s Gateway. You can get the endpoint in the future by also navigating to Consumer > My Flex Plans.

This endpoint acts like any other endpoint that you would use for API or RPC calls. In many cases we even show an example query right there for you to copy into your terminal window to try out. API keys can either be sent as a query parameter (https:://your.endpoint.url/?apikey=<APIKEY>) or as a request header (‘apikey’: ‘<APIKEY>’).

What role am I playing in the SubQuery Network?

By obtaining decentralised RPCs from the SubQuery Network you are acting as a Consumer. A Consumer is either an individual or an organisation that pays for processed and organised blockchain data and/or RPC queries from the SubQuery Network. Consumers effectively make requests to the SubQuery Network for the ability to submit transactions to RPC providers and pay an agreed amount of SQT in return.

What is the benefit of decentralised RPCs?

If you’re reading this article, it’s likely you already highly value decentralisation and understand the importance of eliminating a single point of failure in your tech stack by using a centralised infrastructure provider. As a Consumer, you can interact with completely decentralised RPCs from the SubQuery Network for your dApps. Other benefits include:

  • Faster performance for your dApps. Since your dApps can get data from a decentralised network of RPC providers, the average latency will be lower and performance higher
  • Higher reliability. Due to the decentralised nature of the network, your dApp can immediately fall back to an alternative when an RPC provider goes offline.
  • Focus on developing your application, not on running blockchain infrastructure.
  • Cost-effective. Combining the two points above, consuming data from SubQuery results in a very cost-effective way to power your applications.

Ready to access decentralised RPCs?

Now you see just how easy it is to access decentralised RPCs on the SubQuery Network.

Once you have some SQT in your favourite wallet, you can head to the SubQuery Network app and get started.

About SubQuery

SubQuery Network is innovating web3 infrastructure with tools that empower builders to decentralise the future. Our fast, flexible, and open data indexer supercharges dApps on over 180 networks, enabling a user-focused web3 world. Soon, our Data Node will provide breakthroughs in the RPC industry, and deliver decentralisation without compromise. We pioneer the web3 revolution for visionaries and forward-thinkers. We’re not just a company — we’re a movement driving an inclusive and decentralised web3 era. Let’s shape the future of web3, together.

​​​​Linktree | Website | Discord | Telegram | Twitter | Blog | Medium | LinkedIn | YouTube

--

--

SubQuery Network

SubQuery is here to help you transform and query the world’s data for a web3.0 future. https://subquery.network/