# suix_getLatestSuiSystemState

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://sui-mainnet.g.alchemy.com/v2/{apiKey}

Returns the latest SUI system state object from the blockchain, including information such as current epoch, gas price, validator set, and various protocol-level configuration values.


Reference: https://www.alchemy.com/docs/chains/sui/sui-api-endpoints/suix-get-latest-sui-system-state

## Result

**result** (object): The current system state including validator information and protocol configuration.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "epoch": "733",
    "protocolVersion": "82",
    "systemStateVersion": "2",
    "storageFundTotalObjectStorageRebates": "1867278075428400",
    "storageFundNonRefundableBalance": "104608443378269",
    "referenceGasPrice": "1000",
    "safeMode": false,
    "safeModeStorageRewards": "0",
    "safeModeComputationRewards": "0",
    "safeModeStorageRebates": "0",
    "safeModeNonRefundableStorageFee": "0",
    "epochStartTimestampMs": "1747080104903",
    "epochDurationMs": "86400000",
    "stakeSubsidyStartEpoch": "0",
    "maxValidatorCount": "150",
    "minValidatorJoiningStake": "30000000000000000",
    "validatorLowStakeThreshold": "20000000000000000",
    "validatorVeryLowStakeThreshold": "15000000000000000",
    "validatorLowStakeGracePeriod": "7",
    "stakeSubsidyBalance": "722892969163061985",
    "stakeSubsidyDistributionCounter": "733",
    "stakeSubsidyCurrentDistributionAmount": "79766443076875",
    "stakeSubsidyPeriodLength": "30",
    "stakeSubsidyDecreaseRate": 1000,
    "totalStake": "6892525341580160950",
    "activeValidators": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "suiAddress",
          "name",
          "votingPower",
          "gasPrice",
          "commissionRate",
          "nextEpochStake"
        ],
        "properties": {
          "suiAddress": {
            "type": "string",
            "description": "A 32-byte hexadecimal Sui address (e.g., 0x...)."
          },
          "name": {
            "type": "string"
          },
          "votingPower": {
            "type": "string"
          },
          "gasPrice": {
            "type": "string"
          },
          "commissionRate": {
            "type": "string"
          },
          "nextEpochStake": {
            "type": "string"
          }
        }
      }
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://sui-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "suix_getLatestSuiSystemState"
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({jsonrpc: '2.0', id: 1, method: 'suix_getLatestSuiSystemState'})
};

fetch('https://sui-mainnet.g.alchemy.com/v2/docs-demo', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://sui-mainnet.g.alchemy.com/v2/docs-demo"

payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "suix_getLatestSuiSystemState"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sui-mainnet.g.alchemy.com/v2/docs-demo"

	payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"suix_getLatestSuiSystemState\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://sui-mainnet.g.alchemy.com/v2/docs-demo")
  .header("Content-Type", "application/json")
  .body("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"suix_getLatestSuiSystemState\"\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://sui-mainnet.g.alchemy.com/v2/docs-demo");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"suix_getLatestSuiSystemState\"\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## OpenRPC Method Specification

```yaml
name: suix_getLatestSuiSystemState
summary: Get the latest SUI system state
description: |
  Returns the latest SUI system state object from the blockchain, including information such as current epoch, gas price, validator set, and various protocol-level configuration values.
params: []
result:
  name: result
  description: The current system state including validator information and protocol configuration.
  schema:
    type: object
examples:
  - name: Get latest system state
    params: []
    result:
      name: result
      value:
        epoch: '733'
        protocolVersion: '82'
        systemStateVersion: '2'
        storageFundTotalObjectStorageRebates: '1867278075428400'
        storageFundNonRefundableBalance: '104608443378269'
        referenceGasPrice: '1000'
        safeMode: false
        safeModeStorageRewards: '0'
        safeModeComputationRewards: '0'
        safeModeStorageRebates: '0'
        safeModeNonRefundableStorageFee: '0'
        epochStartTimestampMs: '1747080104903'
        epochDurationMs: '86400000'
        stakeSubsidyStartEpoch: '0'
        maxValidatorCount: '150'
        minValidatorJoiningStake: '30000000000000000'
        validatorLowStakeThreshold: '20000000000000000'
        validatorVeryLowStakeThreshold: '15000000000000000'
        validatorLowStakeGracePeriod: '7'
        stakeSubsidyBalance: '722892969163061985'
        stakeSubsidyDistributionCounter: '733'
        stakeSubsidyCurrentDistributionAmount: '79766443076875'
        stakeSubsidyPeriodLength: '30'
        stakeSubsidyDecreaseRate: 1000
        totalStake: '6892525341580160950'
        activeValidators:
          type: array
          items:
            type: object
            required:
              - suiAddress
              - name
              - votingPower
              - gasPrice
              - commissionRate
              - nextEpochStake
            properties:
              suiAddress:
                type: string
                description: A 32-byte hexadecimal Sui address (e.g., 0x...).
              name:
                type: string
              votingPower:
                type: string
              gasPrice:
                type: string
              commissionRate:
                type: string
              nextEpochStake:
                type: string
```
