Visão geral
Sui gRPC API provides high-performance access to network data through gRPC interfaces. It serves as a powerful tool for developers who need to:
- Access blockchain data with low latency
- Monitor on-chain activities and state changes
- Query account and object states efficiently
- Execute transactions with minimal overhead
Acesso
You can access Sui gRPC directly through your existing Quicknode Sui endpoint—no additional add-ons are needed. The gRPC services are available on port 9000, a dedicated and secure channel for gRPC communication.
Configuração Endpoint do token
When connecting to Sui gRPC services, the port must be specified in the URL:
- Endpoint: O nome do seu endpoint de
.sui-mainnet.quiknode.proe o número da porta9000(por exemplo,https://docs-demo.sui-mainnet.quiknode.pro:9000) - Token: A sequência alfanumérica que se segue ao endpoint na URL
Por exemplo, se endpoint seu endpoint o seguinte aspeto: https://docs-demo.sui-mainnet.quiknode.pro/123456789/, então as suas credenciais de autenticação seriam:
- Endpoint:
https://docs-demo.sui-mainnet.quiknode.pro:9000 - Token:
123456789
Network Availability
Sui gRPC API is available on both Mainnet and Testnet.
Archive Data Access
Archive queries for historical Sui blockchain data are available on Mainnet only through gRPC. Archive access is integrated into your existing gRPC endpoint:
- Same Endpoint: Archive queries use the same endpoint and port (9000) as regular gRPC requests—no separate endpoint needed
- Automatic Routing: Full nodes retain the last 14 epochs. Queries for data older than 14 epochs are routed to archive nodes
- No Configuration Required: Archive access works without any additional setup or configuration
- Mainnet Only: Archive support is not available on Testnet
Note: This differs from the Sui Foundation's approach, which uses separate endpoints for archive data. With Quicknode, you can query both recent and historical data through a single endpoint.
Serviços oferecidos
Sui gRPC API includes the following services:
Ledger Service
- BatchGetObjects: Retrieves multiple objects in a single request
- BatchGetTransactions: Retrieves multiple transactions in a single request
- GetCheckpoint: Retrieves checkpoint information
- GetEpoch: Retrieves epoch information
- GetObject: Retrieves a single object
- GetServiceInfo: Retrieves service information
- GetTransaction: Retrieves a single transaction
Transaction Execution Service
- ExecuteTransaction: Executes a transaction on the Sui network
State Service
- ListDynamicFields: Lists dynamic fields for an object
- ListOwnedObjects: Lists objects owned by an address
- GetCoinInfo: Retrieves coin information
- GetBalance: Retrieves balance for a specific coin type
- ListBalances: Lists all balances for an address
- SimulateTransaction: Simulates transaction execution
Move Package Service
- GetPackage: Retrieves Move package information
- GetDatatype: Retrieves datatype information from a package
- GetFunction: Retrieves function information from a package
- ListPackageVersions: Lists available versions of a package
Subscription Service
- SubscribeCheckpoints: Subscribes to checkpoint updates
Signature Verification Service
- VerifySignature: Verifies transaction signatures
Limits & Data Retention
- Pagination: List and batch operations return paginated results. Always check the
next_page_tokenfield in responses to retrieve additional pages. Do not assume all data is returned in a single request - Field Masks: Use the
read_maskfield when applicable to reduce response size and latency, especially for large resources like objects and transactions - Archive Data: Full nodes retain the last 14 epochs of data. On Mainnet, queries for data older than 14 epochs are automatically routed to archive nodes through your existing endpoint—no separate configuration needed
- Streaming: Use
SubscribeCheckpointsfor real-time data instead of polling. If a stream is interrupted, resume from the last known checkpoint using other APIs to backfill missed data
Making Sui gRPC Requests
To make requests to Sui gRPC using different languages, check out the method-specific documentation for each service. Each method includes examples in: