# suix_getReferenceGasPrice{deprecated} - Sui

> Example code for the suix_getReferenceGasPrice JSON-RPC method. Complete guide on how to use suix_getReferenceGasPrice JSON-RPC in GetBlock Web3 documentation.

This method returns the reference gas price for the current epoch on the SUI network. This minimum gas price is determined by validator voting and is essential for setting appropriate transaction gas budgets.

### Parameters

* None

> **Warning:** This method is deprecated

### Request Example

#### curl

#### curl

```bash
curl --location --request POST https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/ \
--header 'Content-Type: application/json' \
--data-raw '{
  "jsonrpc": "2.0",
  "method": "suix_getReferenceGasPrice",
  "params": [],
  "id": "getblock.io"
}'
```

#### JavaScript (Axios)

#### example.js

```javascript
const axios = require('axios');
axios.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/", {
  jsonrpc: "2.0", method: "suix_getReferenceGasPrice", params: [], id: "getblock.io"
}).then(r => console.log("Gas Price:", r.data.result));
```

#### Request

#### example.py

```python
import requests
url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/"
payload = {"jsonrpc": "2.0", "method": "suix_getReferenceGasPrice", "params": [], "id": "getblock.io"}
response = requests.post(url, headers={"Content-Type": "application/json"}, json=payload)
print("Gas Price:", response.json().get("result"))
```

#### Rust

#### example.rs

```rust
use reqwest::Client;
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    let payload = json!({"jsonrpc": "2.0", "id": "getblock.io", "method": "suix_getReferenceGasPrice", "params": []});
    let response = client.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/").json(&payload).send().await?;
    println!("Response: {:?}", response.text().await?);
    Ok(())
}
```

### Response Sample

#### response.json

```json
{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "result": "1000"
}
```

### Response Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| result | string | Reference gas price in MIST per gas unit |

### Use Cases

1. Transaction Construction

   Set the appropriate gas price when building transactions.

1. Cost Estimation

   Calculate expected transaction costs before submission.

1. Gas Price Monitoring

   Track network gas prices for analytics.

### Error Handling

Network Error

* Description: Connection issues
* Solution: Check endpoint availability

### Web3 Integration

#### Sui Typescript SDK

```jsx
import { SuiClient } from '@mysten/sui/client';
const client = new SuiClient({ url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' });
const gasPrice = await client.getReferenceGasPrice();
console.log(gasPrice);
```
