Skip to main content
The Sui JSON-RPC API provides a comprehensive interface for interacting with the Sui blockchain. It follows the JSON-RPC 2.0 specification and is available over HTTP and WebSocket connections.

API Endpoints

Mainnet:
Testnet:
Devnet:
Local Network:

API Categories

The Sui JSON-RPC API is organized into several namespaces:

Core APIs (sui namespace)

  • ReadApi - Query objects, transactions, checkpoints, and protocol state
  • WriteApi - Execute and inspect transactions

Extended APIs (suix namespace)

Transaction Builder (unsafe namespace)

Making Requests

HTTP Example

WebSocket Subscriptions

WebSocket connections enable real-time event subscriptions:

Request Format

All JSON-RPC requests must include:
  • jsonrpc: Version string, always "2.0"
  • id: Request identifier (number or string)
  • method: API method name (e.g., "sui_getObject")
  • params: Array of parameters (order matters)

Response Format

Successful responses:
Error responses:

Rate Limits

Public RPC endpoints have rate limits. For production applications:
  • Run your own full node
  • Use a managed RPC provider
  • Implement exponential backoff for retries

API Discovery

Query available methods using the rpc.discover method:

Next Steps

  • Explore specific APIs in the sidebar
  • Use the Rust SDK for type-safe interactions
  • Try the GraphQL API for flexible queries