> For the complete documentation index, see [llms.txt](https://docs.getblock.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getblock.io/api-reference/sui-sui/deprecated-json-rpc-methods/suix_getreferencegasprice-deprecated-sui.md).

# suix\_getReferenceGasPrice{deprecated} - Sui

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

{% hint style="warning" %}
This method is deprecated
{% endhint %}

### Request Example

{% tabs %}
{% tab title="curl" %}
{% code title="curl" %}

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

{% endcode %}
{% endtab %}

{% tab title="JavaScript (Axios)" %}
{% code title="example.js" %}

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

{% endcode %}
{% endtab %}

{% tab title="Request" %}
{% code title="example.py" overflow="wrap" %}

```python
import requests
url = "https://go.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"))
```

{% endcode %}
{% endtab %}

{% tab title="Rust" %}
{% code title="example.rs" overflow="wrap" %}

```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://go.getblock.io/<ACCESS-TOKEN>/").json(&payload).send().await?;
    println!("Response: {:?}", response.text().await?);
    Ok(())
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Response Sample

{% code title="response.json" %}

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

{% endcode %}

### 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.
2. Cost Estimation

   Calculate expected transaction costs before submission.
3. Gas Price Monitoring

   Track network gas prices for analytics.

### Error Handling

Network Error

* Description: Connection issues
* Solution: Check endpoint availability

### Web3 Integration

{% code title="Sui Typescript SDK" %}

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

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.getblock.io/api-reference/sui-sui/deprecated-json-rpc-methods/suix_getreferencegasprice-deprecated-sui.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
