---
title: "Estimate gas for a transaction"
method: POST
path: "/v3/blockchain/estimate"
tags: ["Fee Estimation API"]
---

# Estimate gas for a transaction

`POST /v3/blockchain/estimate`

**10 credits per API call**

Estimate the current fee for different types of transactions.

This API is supported for the following blockchains:

*   Bitcoin
*   BNB Smart Chain
*   Celo
*   Dogecoin
*   Ethereum
*   Harmony
*   Klaytn
*   Litecoin
*   Polygon
*   XinFin

## Request body

- union
  - EstimateFee
    - `chain` 'CELO' | 'ETH' | 'BSC' | 'XDC' | 'ONE' | 'MATIC' | 'KLAY', required — The blockchain to estimate the fee for
    - `type` 'DEPLOY_ERC20' | 'DEPLOY_NFT' | 'MINT_NFT' | 'BURN_NFT' | 'TRANSFER_NFT' | 'TRANSFER_ERC20' | 'DEPLOY_AUCTION' | 'DEPLOY_MARKETPLACE', required — The type of the transaction
    - `sender` string — (Only if <code>type=TRANSFER_ERC20</code>) The blockchain address of the sender address
    - `recipient` string — (Only if <code>type=TRANSFER_ERC20</code>) The blockchain address of the recipient address
    - `contractAddress` string — (Only if <code>type=TRANSFER_ERC20</code>) The blockchain address of the smart address of the fungible token
    - `amount` string — (Only if <code>type=TRANSFER_ERC20</code>) The amount of the fungible token to be sent
  - EstimateFeeBatchMintNft
    - `chain` 'CELO' | 'ETH' | 'BSC' | 'XDC' | 'ONE' | 'MATIC' | 'KLAY', required — Blockchain to estimate fee for.
    - `type` 'MINT_NFT_BATCH', required — Type of transaction
    - `sender` string, required — Address of the minter
    - `recipients` string[], required — Blockchain addresses to mint tokens to
    - `contractAddress` string, required — Contract address of NFT token
    - `tokenIds` string[], required — Token IDs
    - `urls` string[], required — Metadata URLs
  - EstimateFeeDeployCustodialWallet
    - `chain` 'CELO' | 'ETH' | 'BSC' | 'XDC' | 'ONE' | 'MATIC' | 'KLAY', required — Blockchain to estimate fee for.
    - `type` 'DEPLOY_CUSTODIAL_WALLET_BATCH', required — Type of transaction
    - `batchCount` number, required — Number of addresses to create
  - EstimateFeeTransferFromCustodial
    - `chain` 'CELO' | 'ETH' | 'BSC' | 'XDC' | 'KLAY' | 'ONE' | 'MATIC', required — The blockchain to estimate the fee for
    - `type` 'TRANSFER_CUSTODIAL', required — The type of the transaction
    - `sender` string, required — The blockchain address of the sender
    - `recipient` string, required — The blockchain address of the recipient
    - `contractAddress` string — Contract address of the token
    - `custodialAddress` string, required — The blockchain address of the custodial wallet contract
    - `tokenType` 0 | 1 | 2 | 3, required — The type of the asset to transfer. Set <code>0</code> for fungible tokens (ERC-20 or equivalent), <code>1</code> for NFTs (ERC-721 or equivalent), <code>2</code> for Multi Tokens (ERC-1155 or equivalent), or <code>3</code> for native blockchain currencies.
    - `amount` string, required — <ul><li>If the asset to transfer is a fungible token, Multi Token, or a native blockchain currency, set this parameter to the amount to transfer.</li> <li>If the asset to transfer is an NFT, set this parameter to <code>1</code>.</li></ul>
    - `tokenId` string — (only if tokenType = 1 or 2) Token id
  - EstimateFeeFromAddress
    - `chain` 'BTC' | 'DOGE' | 'LTC', required — Blockchain to estimate fee for.
    - `type` 'TRANSFER', required — Type of transaction
    - `fromAddress` string[], required — Array of addresses. Tatum will automatically scan last 100 transactions for each address and will use all of the unspent values. We advise to use this option if you have 1 address per 1 transaction only.
    - `to` object[], required — Array of addresses and values to send bitcoins to. Values must be set in BTC. Difference between from and to is transaction fee.
      - `address` string, required — Destination address.
      - `value` number, required — Amount to be sent, in BTC.
  - EstimateFeeFromUTXO
    - `chain` 'BTC' | 'DOGE' | 'LTC', required — Blockchain to estimate fee for.
    - `type` 'TRANSFER', required — Type of transaction
    - `fromUTXO` object[], required — Array of transaction hashes, index of UTXO in it and corresponding private keys. Use this option if you want to calculate amount to send manually. Either fromUTXO or fromAddress must be present.
      - `txHash` string, required — Transaction hash of the UTXO to be spent.
      - `index` number, required — Index of the UTXO to be spent.
    - `to` object[], required — Array of addresses and values to send bitcoins to. Values must be set in BTC. Difference between from and to is transaction fee.
      - `address` string, required — Destination address.
      - `value` number, required — Amount to be sent, in BTC.

## Response `200`

OK

- union
  - FeeBtcBased
    - `fast` string, required — Transaction fee in BTC|LTC to be paid, if transaction should be included in next 1-2 blocks.
    - `medium` string, required — Transaction fee in BTC|LTC to be paid, if transaction should be included in next 5-6 blocks.
    - `slow` string, required — Transaction fee in BTC|LTC to be paid, if transaction should be included in next 7+ blocks.
  - FeeEvmBased
    - `gasLimit` number, required — Gas limit for transaction in gas price.
    - `gasPrice` number, required — Gas price in Gwei.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
- `403` — Forbidden. The request is authenticated, but it is not possible to perform the operation due to logical error or invalid permissions.
- `500` — Internal server error. There was an error on the server during the processing of the request.

---

[API](https://skmtc.net/tatum/apis/blockchain-data.md) · [All operations](https://skmtc.net/tatum/apis/blockchain-data/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tatum/blockchain-data/versions/8622ee4b8fae/schema)
