Skip to main content
Get started with a reliable Sui RPC endpoint to use the tools below.

JSON-RPC API

Interact with your Sui node using the Sui JSON-RPC API. Use your Chainstack Sui RPC endpoint to make API calls. Example to get the latest checkpoint:
curl --request POST \
  --url YOUR_CHAINSTACK_ENDPOINT \
  --header 'Content-Type: application/json' \
  --data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sui_getLatestCheckpointSequenceNumber",
    "params": []
  }'

gRPC API

Sui nodes on Chainstack support gRPC for high-performance access. gRPC uses HTTP/2 and Protocol Buffers for efficient binary serialization, making it ideal for streaming data and high-throughput applications.

Endpoint format

Your Sui gRPC endpoint is available at:
sui-mainnet.core.chainstack.com:443

Authentication

gRPC endpoints use x-token authentication. Pass your token in the request metadata:
  • x-token — your authentication token from the Chainstack console

Usage examples

grpcurl -H "x-token: YOUR_X_TOKEN" \
  sui-mainnet.core.chainstack.com:443 \
  list
Find your gRPC endpoint and x-token in the Chainstack console under your Sui node’s Access and credentials section.

Sui TypeScript SDK

The Sui TypeScript SDK is the official SDK for building Sui applications.

Installation

npm install @mysten/sui.js

Basic usage

import { SuiClient, getFullnodeUrl } from '@mysten/sui.js/client';

// Connect to your Chainstack node
const client = new SuiClient({
  url: 'YOUR_CHAINSTACK_ENDPOINT'
});

// Get latest checkpoint
const checkpoint = await client.getLatestCheckpointSequenceNumber();
console.log('Latest checkpoint:', checkpoint);

Sui Rust SDK

The Sui Rust SDK provides comprehensive Rust bindings for Sui.

Installation

Add to your Cargo.toml:
sui-sdk = { git = "https://github.com/mystenlabs/sui", package = "sui-sdk" }
tokio = { version = "1.2", features = ["full"] }
anyhow = "1.0" 

Basic usage

use sui_sdk::SuiClientBuilder;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let sui = SuiClientBuilder::default()
        .build("YOUR_CHAINSTACK_ENDPOINT")
        .await?;
    
    let checkpoint = sui.read_api().get_latest_checkpoint_sequence_number().await?;
    println!("Latest checkpoint: {}", checkpoint);
    
    Ok(())
}

Python SDK (pysui)

pysui is a community-maintained Python SDK for Sui.

Installation

pip install pysui

Basic usage

from pysui import SuiConfig, SyncClient

# Configure client with your Chainstack endpoint
config = SuiConfig.custom_config(
    rpc_url="YOUR_CHAINSTACK_ENDPOINT"
)

client = SyncClient(config)

# Get latest checkpoint
checkpoint = client.get_latest_checkpoint_sequence_number()
print(f"Latest checkpoint: {checkpoint.result_data}")

Go SDK

The Sui Go SDK provides Go language bindings for Sui.

Installation

go get github.com/block-vision/sui-go-sdk

Basic usage

package main

import (
    "context"
    "fmt"
    "github.com/block-vision/sui-go-sdk/sui"
)

func main() {
    client := sui.NewSuiClient("YOUR_CHAINSTACK_ENDPOINT")
    
    ctx := context.Background()
    checkpoint, err := client.SuiGetLatestCheckpointSequenceNumber(ctx)
    if err != nil {
        panic(err)
    }
    
    fmt.Printf("Latest checkpoint: %s\n", checkpoint)
}