---
title: "Estimate Gas"
method: POST
path: "/defi/v1/chain/estimategas"
tags: ["chain"]
---

# Estimate Gas

`POST /defi/v1/chain/estimategas`

## Request

- Base URL: `https://svc.blockdaemon.com`
- URL: `https://svc.blockdaemon.com/defi/v1/chain/estimategas`
- Auth: API key in header `X-API-Key`

Estimates the gas required for a proposed transaction on EVM-compatible chains by simulating its execution. The response provides an approximate gas limit, helping developers set optimal fees and avoid underfunding errors.

> 💡 
**Compute Unit Value:** `30` (Fixed)

## Request body

- ChainEstimategasRequest: The request body for a /defi/v1/chain/estimategas
  - `chainId` '1' | '11155111' | '56' | '25' | '97' | '43114' | '338' | '43113' | '42161' | '421614' | '17000' | '10' | '11155420' | '4002' | '324' | '300' | '137' | '80002' | '250' | '8453' | '84532' | '5000' | '5003' | '8217' | '1001': The unique ID to direct queries or transactions to the correct blockchain. Find more [here](https://docs.blockdaemon.com/docs/defi-api-supported-protocols#supported-chains).
  - `chainSymbol` string: The abbreviated chain name for queries or transactions.
  - `data` string, required: Encoded function call data for the transaction.
  - `from` string, required: Public blockchain address of the sender initiating the transaction. Format depends on the chain (e.g., 0xABCDEF... for EVM, G... for Stellar).
  - `to` string, required: Public blockchain address of the recipient. Format depends on the chain (e.g., 0xABCDEF... for EVM, G... for Stellar).
  - `value` string: Amount of native currency to send with the transaction, specified in wei (integer string). Example: '1000000000000000000' = 1 ETH.

## Response `200`

Successful response

- object
  - `status` integer
  - `msg` string
  - `data` object

---

[API](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api.md) - [All operations](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api/llms.txt) - [OpenAPI document](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api/revisions/ec053b7c8041?raw)
