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": []
  }'
const response = await fetch('YOUR_CHAINSTACK_ENDPOINT', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'sui_getLatestCheckpointSequenceNumber',
    params: []
  })
});

const data = await response.json();
console.log(data.result);
import requests

payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sui_getLatestCheckpointSequenceNumber",
    "params": []
}

response = requests.post('YOUR_CHAINSTACK_ENDPOINT', json=payload)
print(response.json()['result'])

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
sui-testnet.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
import grpc

# Create channel with TLS
channel = grpc.secure_channel(
    'sui-mainnet.core.chainstack.com:443',
    grpc.ssl_channel_credentials()
)

# Add x-token to metadata for all calls
metadata = [('x-token', 'YOUR_X_TOKEN')]

# Use the channel with your gRPC stubs
# Example: stub = SuiServiceStub(channel)
# response = stub.SomeMethod(request, metadata=metadata)
const grpc = require('@grpc/grpc-js');

// Create credentials with TLS
const credentials = grpc.credentials.createSsl();

// Create channel
const channel = new grpc.Channel(
  'sui-mainnet.core.chainstack.com:443',
  credentials
);

// Add x-token to metadata for calls
const metadata = new grpc.Metadata();
metadata.add('x-token', 'YOUR_X_TOKEN');

// Use with your gRPC client
package main

import (
    "google.golang.org/grpc"
    "google.golang.org/grpc/credentials"
    "google.golang.org/grpc/metadata"
    "context"
)

func main() {
    // Create TLS credentials
    creds := credentials.NewTLS(nil)

    // Connect to gRPC endpoint
    conn, err := grpc.Dial(
        "sui-mainnet.core.chainstack.com:443",
        grpc.WithTransportCredentials(creds),
    )
    if err != nil {
        panic(err)
    }
    defer conn.Close()

    // Add x-token to context
    ctx := metadata.AppendToOutgoingContext(
        context.Background(),
        "x-token", "YOUR_X_TOKEN",
    )

    // Use ctx with your gRPC calls
}
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);
import { SuiClient } from '@mysten/sui.js/client';

const client = new SuiClient({
  url: 'YOUR_CHAINSTACK_ENDPOINT'
});

// Get objects owned by an address
const objects = await client.getOwnedObjects({
  owner: '0x...',
  options: {
    showType: true,
    showContent: true,
  }
});
import { SuiClient } from '@mysten/sui.js/client';
import { TransactionBlock } from '@mysten/sui.js/transactions';
import { Ed25519Keypair } from '@mysten/sui.js/keypairs/ed25519';

const client = new SuiClient({
  url: 'YOUR_CHAINSTACK_ENDPOINT'
});

const keypair = Ed25519Keypair.generate();
const tx = new TransactionBlock();

// Add transaction commands
tx.transferObjects([objectId], recipient);

// Sign and execute
const result = await client.signAndExecuteTransactionBlock({
  signer: keypair,
  transactionBlock: tx,
});

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)
}
Last modified on July 7, 2026