Back to Web3 Builder Hub: Developer Resources for Every Chain

ℹ Introduction To SUI Network RPCs and RPC Node Providers

Sui provides multiple ways for developers and users to access on-chain data and interact with its network. This is primarily done throughRemote Procedure Call (RPC)interfaces and services hosted by variousRPC node providers. These access mechanisms are available across Sui’s networks:Mainnet,Testnet,Devnet, andLocalnet.


1.Accessing Sui Network Data

You can interact with the Sui network via:

  • Sui Full Node JSON-RPC: The primary RPC interface, allowing real-time and historical access to network data such as transaction details, object state, and on-chain events. Most developers connect to JSON-RPC endpoints hosted by RPC providers or operate their own full node.
  • Sui Foundation Load-Balanced Endpoints: Simplified access via URLs managed by the Sui Foundation. These endpoints are ideal for development or exploration, butnot recommended for production usedue to limited guarantees on stability and scaling.
  • Custom Indexers: Developers who need specialized access patterns (e.g., tracking specific object types or relationships) can run their own indexers. These indexers extract and store chain data into PostgreSQL databases for advanced querying.

2.JSON-RPC API

Sui’s JSON-RPC supports bothreal-time queriesandhistorical lookups. However, historical data retention is subject to each node'spruning strategy. If a full node no longer retains the historical data, it will fall back to a Sui Foundation-managed key-value store for retrieval.

Example Use Cases:

  • Query account balances and object ownership
  • Submit and simulate transactions
  • Fetch on-chain events and logs

3.GraphQL for Sui RPC (Alpha)

Sui also provides aGraphQLinterface as a public RPC service. Still in alpha, this interface offers structured, efficient querying over chain state and is supported on Devnet, Testnet, and Mainnet.

Key Features:

  • Queries: Read chain state, simulate transactions (dryRunTransactionBlock), fetch objects and addresses.
  • Mutations: Perform state-changing actions like executing transaction blocks.
  • Structured Types: Exposes Move objects, addresses, and ownership data through GraphQL schemas.

Note: While promising, GraphQL RPC is still in early development and not recommended for production.


4.SuiJSON Format

To interact with the Sui network through RPC, input data must followSuiJSON—a JSON format constrained to align with Move’s strict type system.

Examples of SuiJSON Constraints:

  • u64,u128,u256must be passed asstrings, not raw numbers.
  • nullandobjectsare not allowed.
  • Vectors must behomogeneousand valid for Move types.
  • Addresses and ObjectIDs must be 32-byte hex strings prefixed with0x.

This design ensures accurate and type-safe handling of on-chain data and function calls, especially when invoking smart contracts.


5.RPC Node Providers

Several community and commercial providers host publicly accessible or subscription-based RPC nodes. These services may include:

  • Load-balanced and geo-distributed full node access
  • Enhanced indexing and analytics
  • Higher throughput and availability guarantees

Using a third-party provider can simplify development while ensuring performance, especially if you’re not running your own infrastructure.


Summary

Access MethodUse CaseNetwork SupportProduction Use
JSON-RPCReal-time + historical data, tx submissionMainnet, Testnet, DevnetYes
GraphQL RPC (Alpha)Structured queries, object relationsMainnet, Testnet, DevnetNo
Custom IndexerAdvanced data filtering and queryingAll networksYes
Foundation EndpointsQuick prototypingAll networksNo

For production applications, it's recommended to use self-hosted full nodes or trusted RPC providers, along with properly formatted SuiJSON inputs or GraphQL queries once the service matures.


SUI Network RPC Node Providers

DIA provides oracle data for Sui

Asset prices sourced from 80+ exchanges, lending rates, and protocol-level data. Verifiable computation from source to chain, published through DIA's Lumina oracle network.