> For the complete documentation index, see [llms.txt](https://docs.chiliz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chiliz.com/ko/gaebal/goseup/gasbi-chujeong.md).

# 가스비 추정

트랜잭션 수수료(또는 "가스 수수료")는 네트워크 활동에 따라 크게 달라질 수 있으므로, 원활한 사용자 경험을 위해 신뢰할 수 있는 추정 방법이 중요합니다.

{% hint style="warning" %}
트랜잭션이 "보류 중" 상태로 너무 오래 남지 않으려면 수수료를 충분히 포함해야 합니다.

* 최소 가스 수수료: 2,501 Gwei.
* 최소 우선 수수료: 1 Gwei.
  {% endhint %}

## Chiliz Chain 개발자에게 의미하는 바는?

다른 블록체인과 마찬가지로 Chiliz Chain의 모든 트랜잭션에 가스를 지불해야 합니다.

핵심은 실패하거나 지연된 트랜잭션을 방지하기 위해 비용 효율성과 적시 확인 사이의 균형을 맞추는 것입니다. 가스 추정을 최신 상태로 유지하면 과다 지불과 과소 지불을 모두 방지할 수 있습니다.

## 네이티브 방식으로 조회

*기본(vanilla)* 방식을 선호한다면 [Chiliz Chain RPC 서버](/ko/gaebal/gibon/chiliz-chain-yeongyeol/rpc-yeongyeol.md)에 [cURL](https://curl.se/) 요청을 사용할 수 있습니다. 여기를 참조하세요: [팁 & 트릭](/ko/gaebal/gibon/tip-teurik.md#how-to-get-the-current-gas-price).

## 탐색기 API를 통한 조회

[Chiliscan](https://chiliscan.com/)과 [Chiliz Block Explorer](https://scan.chiliz.com/) 모두 Chiliz Chain의 현재 가스 가격을 조회할 수 있는 API를 제공합니다.

{% hint style="warning" %}
사용 가능한 API 메서드/엔드포인트와 상호작용하려면 API 키가 필요합니다.
{% endhint %}

{% hint style="info" %}
두 탐색기 모두 "가스 추적기" 페이지를 제공합니다.

* <https://chiliscan.com/insight/leaderboard/gas-tracker>
* <https://scan.chiliz.com/gas-tracker>
  {% endhint %}

### Chiliscan API 사용

Chiliscan API는 이 목적을 위해 `avg-gas-price` 메서드를 제공합니다.

{% embed url="<https://chiliscan.com/documentation/api/swagger>" %}

{% code overflow="wrap" %}

```bash
curl -X 'GET' \
  'https://api.routescan.io/v2/network/mainnet/evm/88888/aggregations/avg-gas-price?apikey=YourApiKeyToken' \
  -H 'accept: application/json'
```

{% endcode %}

... 현재 값이 포함된 JSON 문자열을 반환합니다.

### Chiliz Block Explorer API 사용

Chiliz Block Explorer API에는 해당 정보를 제공하는 stats 엔드포인트가 있습니다.

{% embed url="<https://scan.chiliz.com/api-docs?tab=rest_api>" %}

```bash
curl -X 'GET' \
  'https://scan-api.chiliz.com/api/v2/stats' \
  -H 'accept: application/json'
```

엔드포인트는 가스 가격 정보를 포함한 결과를 반환합니다. 예를 들어:

```json
{
  "total_blocks": "508700",
  "total_addresses": "982340",
  "total_transactions": "1699427",
  "average_block_time": 25000,
  "coin_price": "0.00254957",
  "total_gas_used": "0",
  "transactions_today": "622",
  "gas_used_today": "49063630",
  "gas_prices": {
    "average": 10,
    "fast": 10,
    "slow": 10
  },
  "static_gas_price": "10.1",
  "market_cap": "420471.10604559750644",
  "network_utilization_percentage": 40.2142
}
```

다음 섹션을 사용하세요(가격은 Gwei 단위):

```json
"gas_prices": {
    "average": 10,
    "fast": 10,
    "slow": 10
  },
```

{% hint style="info" %}

* `average`는 적당한 비용으로 다음 몇 블록 내에 안정적으로 포함되는 균형을 제공합니다.
* `fast`는 가장 높은 프리미엄을 지불하여 검증자가 트랜잭션을 즉시 우선 처리하도록 유도하며, 긴급한 경우 가장 빠른 확인을 보장합니다.
* `slow`는 가장 낮은 수수료를 제공하지만 네트워크 혼잡이 증가하면 트랜잭션이 보류 상태로 남을 위험이 있습니다.
  {% endhint %}

## Blocknative를 이용한 조회

[Blocknative](https://www.blocknative.com/)는 공개 블록체인 네트워크에서 트랜잭션의 복잡성을 모니터링하고 관리하는 인프라를 구축합니다.

Blocknative의 [Gas API](https://docs.blocknative.com/gas-prediction/gas-platform)는 가스 가격을 실시간으로 안정적으로 검색하는 방법을 제공합니다.

### Step 1: 키 받기

프로젝트에서 Blocknative Gas API를 사용하려면 API 키가 필요합니다.

먼저 [Gas Network에 가입](https://www.gas.network/)하면 자체 API 키를 받을 수 있습니다.

### Step 2: Gas API 호출 구현

API 키가 생기면 Chiliz의 수수료 추정을 요청할 수 있습니다.

{% hint style="info" %}
Chiliz Chain Mainnet의 체인 ID는 `88888`입니다.
{% endhint %}

가장 간단한 방법은 REST 요청을 통해 API를 호출하는 것입니다. 예를 들어, 명령줄을 통해:

{% code overflow="wrap" %}

```bash
curl -H "Authorization: your-apikey-here" \
  'https://api.blocknative.com/gasprices/blockprices?chainid=88888'
```

{% endcode %}

[Blocknative 문서](https://docs.blocknative.com/gas-prediction/gas-platform)에서 자세히 알아보세요.


---

# 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.chiliz.com/ko/gaebal/goseup/gasbi-chujeong.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.
