Skip to main content

Data Overview

The RPC, data indexers, Hubble, and Horizon are platforms or tools that facilitate communication between users and applications and the Stellar network. With these various platforms, users can query network data, submit transactions, and interact with smart contracts without needing to understand the low-level details of Stellar Core.

This section will walk you through the differences between the various platforms and tools, what platform or tool is best for what use case, and then link to their various documentation locations.

RPC

The RPC primarily provides information that the Stellar network currently has in view, i.e., the current state, which includes the current balances of all accounts, the current state of smart contracts, and any other relevant information that constitutes the present condition of the blockchain. It has the ability to send a transaction to the network and query the network for the status of previous transactions (subject to the retention window of seven days, transactions older than that will return a NOT_FOUND response). The RPC is meant to be simple, minimal, and scalable.

The RPC provides the data availability services needed for most real-time use cases, such as applications and wallets, as long as they are primarily interested in current state data or are willing to ingest events into their own infrastructure to support reporting, analytical, and/or historical queries.

Since the RPC does not contain the full, holistic history of the network, you should use Hubble for more complex data analysis over longer periods of time.

If the RPC does not otherwise serve your needs, please tell us why in the Stellar Developer Discord or file an issue in the RPC repo.

You have the option of setting up your own RPC instance or using a publicly available service from an infrastructure provider.

Data Indexers

Data indexers are specialized tools that process and index blockchain data, making it more accessible and queryable to end users. They transform raw blockchain data into a more structured format that’s easier for end users to interact with.

Data indexers have advanced querying capabilities and enhanced analytics. They provide features such as statistical analysis of blockchain activity, visualization of transaction flows, or tracking DeFi metrics — capabilities that go beyond basic transaction lookup for current or historical state data.

Data indexers are a potentially more user-friendly, cost-effective choice for users. Check out several available data indexers for the Stellar network in our Tools section.

Hubble

Hubble is an SDF-maintained, open-source, publicly available BigQuery data warehouse that provides a complete, holistic historical record of the Stellar network. It is a read-only platform and does not have the capability to send transactions to the network like you can with RPC.

Hubble is great for large-scale computing, complex and exploratory data analysis, and viewing transactions, fees, and other network-level trends over time. For example, you can use Hubble to bundle a month’s worth of ledgers together, calculate the average transaction fee for a certain type of transaction, and the average time for it to be included in the ledger. And then you can schedule to receive that report every month.

Hubble is not good for use cases that need real-time data availability, like wallets or applications, or for simple queries, like looking up a transaction ID. For those, you’d want to use the RPC or data indexers.

The Hubble documentation focuses on exploratory data analysis, outlines different ways developers or end users can connect to Hubble (programmatically or through a UI), and provides guidance on query optimization (users are charged per query, so it’s important to craft your query thoughtfully).

Horizon

Horizon is an API for accessing and interacting with the Stellar network data. It does not store smart contract data. Horizon does, however, have a limited view of the Stellar Asset Contract (SAC) and smart contract operation types (i.e., it ingests transactions with invokeHostFunction operations and asset-related operations, whether they’re made through an asset’s SAC or using the built-in transaction operations).

Horizon stores three types of data (current state, historical state, and derived state) in one database, and the data is available in real-time for transactional use, which makes Horizon more expensive and resource-intensive to operate. If you’re considering using Horizon over the RPC, let us know in the Stellar Developer Discord or file an issue in the RPC repo and let us know why!

You can run your own instance of Horizon or use one of the publicly available Horizon services from these infrastructure providers.