---
updatedAt: 2025-11-24T18:58:22.000Z
agentTools:
  projectIndex: https://docs.tatum.io/llms.txt
---

# Fee Estimation

Understand and implement blockchain fee & gas estimation on Bitcoin-like UTXO chains and EVM chains. Quick start examples, best practices, and FAQs.

Tatum makes it easy to **estimate transaction fees** across major blockchains:

* **UTXO chains** (Bitcoin, Litecoin, Bitcoin Cash): fee = *feerate per byte* × *tx size in bytes*
* **EVM chains** (Ethereum and EVM-compatible): fee = *gasUsed* × *(baseFee + priorityFee)*

Use this guide to understand how fees work, pick the right Tatum endpoint, and ship with confident defaults.

<Callout icon="🔗" theme="default">
  ### Jump to chain-specific guides:

  * [Bitcoin – How fee estimate works](/docs/btc-fee-estimate)  
  * [Litecoin – How fee estimate works](/docs/ltc-how-fee-estimate-works)  
  * [Bitcoin Cash – How fee estimate works](/docs/bch-fee-estimate)  
  * [EVM – How gas & fee estimate works](/docs/evm-how-fee-estimate-works)  
  * [UTXO – Minimum relay fee](/docs/utxo-minimum-relay-fee)  
  * SDK helper: [JS SDK – Tatum Fee submodule](/docs/getcurrentfee)
</Callout>

## Quickly start using Fee Estimation

### Option A — Get recommended fee/gas for a chain

Use when you need **“fast / standard / slow”** suggestions for a network.

```curl
curl --request GET \
  --url https://api.tatum.io/v3/blockchain/fee/ETH \
  --header 'x-api-key: {YOUR_API_KEY}'
```

Returns network-aware recommendations (e.g., `baseFee`, `slow`, `medium`, `fast`).

### Option B — Estimate gas for a concrete EVM transaction

Use when you know `from`, `to`, and `amount` (or calldata) and want **gasLimit + gasPrice**.

```curl
curl --request POST \
  --url https://api.tatum.io/v4/blockchainOperations/gas \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: {YOUR_API_KEY}' \
  --data '{
    "chain": "ETH",
    "from": "0x0974557990949352a20369fbe6210b3ee64....",
    "to":   "0xcdfeaf3b4a7beb3cc1fafb7ea34dc9a40b61....",
    "amount": "4.5"
  }'
```

Responds with

```json
{ "gasLimit": "24126", "gasPrice": "12000000000" } // gasPrice in wei
```

### Option C — SDK helper (multi-chain)

```typescript
import { TatumSDK, Network, ApiVersion } from "@tatumio/tatum";

const tatum = await TatumSDK.init({ network: Network.ETHEREUM, version: ApiVersion.V3 });
const fee = await tatum.fee.getCurrentFee();   // slow/medium/fast + baseFee
console.log(fee.data.gasPrice.fast);
```

<Callout icon="🔗" theme="default">
  ### API reference:

  * **Get recommended fee/gas**: [/reference/getblockchainfee](/reference/getblockchainfee)  
  * **Estimate EVM gas for a tx**: [/reference/estimategas](/reference/estimategas)  
  * **Estimate fee for a blockchain tx**: [/reference/estimatefeeblockchain](/reference/estimatefeeblockchain)
</Callout>

## Fee models by chain

| Blockchain             | Unit (what you set)            | Model                   | Practical formula                           |
| ---------------------- | ------------------------------ | ----------------------- | ------------------------------------------- |
| **Bitcoin (BTC)**      | **sat/vByte**                  | UTXO, market auction    | **Fee = feerate (sat/vB) × tx size (vB)**   |
| **Litecoin (LTC)**     | **litoshi/byte**               | UTXO                    | **Fee = feerate × tx size**                 |
| **Bitcoin Cash (BCH)** | **sat/byte**                   | UTXO                    | **Fee = feerate × tx size**                 |
| **Ethereum / EVM**     | **gwei per gas** (wei on-wire) | Account-based, EIP-1559 | **Fee = gasUsed × (baseFee + priorityFee)** |

<Callout icon="📌" theme="default">
  ### For BTC/LTC/BCH, **transaction size** depends mainly on *inputs* and *outputs*. See:

  * [BTC guide](/docs/btc-fee-estimate) \| [LTC guide](/docs/ltc-how-fee-estimate-works) \| [BCH guide](/docs/bch-fee-estimate)
</Callout>

## When to use which Estimation API endpoint?

* **I just need the[current network fees](/reference/getblockchainfee)**\
  → `GET https://api.tatum.io/v3/blockchain/fee/{chain}` (slow/medium/fast)
* **I know the transaction params and[want gasLimit + gasPrice (EVM)](https://docs.tatum.io/reference/estimategas)**\
  → `POST https://api.tatum.io/v4/blockchainOperations/gas`
* **I’m creating/broadcasting with Tatum and want a[one-shot estimate](/reference/estimatefeeblockchain)**\
  → `POST https://api.tatum.io/v3/blockchain/estimate`

<Callout icon="🧭" theme="default">
  ### Tip: For **smart contracts** (swaps, mints, complex calls), simulate or trace for accurate `gasUsed`. See: [EVM simulation & traces](/docs/evm-how-fee-estimate-works#tatum-transaction-simulation---evm)
</Callout>

## EVM fees in 90 seconds

* **Base fee** (per block) + **priority fee** (your tip) = **effective gas price**.
* You set **gasLimit** (upper bound). You pay for **gasUsed**, not for `gasLimit`.
* **Total fee (ETH)** = `gasUsed × (baseFee + priorityFee)`; units on-wire are **wei** (1 gwei = 10⁹ wei).

**Example**

* Estimated `gasLimit` = `24,126`
* Suggested `gasPrice` = `12 gwei`
* If `gasUsed` = `21,000`, **fee** ≈ `21,000 × 12 gwei = 252,000 gwei = 0.000252 ETH`.

> ⚠️ Too-low priority fee or gasLimit can cause `"gas required exceeds allowance"` or inclusion delays. Prefer `fast` during congestion.

## UTXO fees in 90 seconds (BTC/LTC/BCH)

* Nodes/miners prioritize by **feerate** (sat/vByte).
* **Tx size (vBytes)** ≈ `(inputs × 148) + (outputs × 34) + 10` (rule of thumb).
* **Total fee (sats)** = `feerate (sat/vB) × size (vB)`.

**Example**

* Inputs: 2, Outputs: 2 → size ≈ 374 vB
* Feerate: 13.5 sat/vB → **fee** ≈ `374 × 13.5 = 5049 sats`

<Callout icon="📌" theme="default">
  ### Also know **minimum relay fee** thresholds. See: [UTXO – Minimum relay fee](/docs/utxo-minimum-relay-fee)
</Callout>

## Best practices

* **Refresh often:** fees are **volatile**; compute right before sending.
* **Offer choices:** expose *slow / standard / fast* with ETA hints in your UI.
* **Guard rails:** add max fee caps and sanity checks (e.g., “fee > X% of amount”).
* **Simulate contracts:** for complex EVM calls, run simulation or use traces.
* **Handle stuck txs (UTXO):** support RBF/CPFP strategies in wallets.
* **Convert units correctly:** EVM `gasPrice` is **wei**; display to users in **gwei**.

## Examples of API Requests

### Get recommended BTC fees (slow/standard/fast)

```curl
curl --request GET \
  --url https://api.tatum.io/v3/blockchain/fee/BTC \
  --header 'x-api-key: {YOUR_API_KEY}'
```

See the [BTC guide](/docs/btc-fee-estimate) for manual calculation (sat/vB × vBytes).

### Estimate EVM gas for a transfer

```curl
curl --request POST \
  --url https://api.tatum.io/v4/blockchainOperations/gas \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: {YOUR_API_KEY}' \
  --data '{
    "chain": "ETH",
    "from": "0x....",
    "to": "0x....",
    "amount": "0.01"
  }'
```

### JS SDK – get current network fees

```typescript
import { TatumSDK, Network, ApiVersion } from "@tatumio/tatum";
const tatum = await TatumSDK.init({ network: Network.BITCOIN, version: ApiVersion.V3 });
const fee = await tatum.fee.getCurrentFee();
console.log(fee.data.gasPrice); // slow/medium/fast/baseFee (+ unit)
```

<HTMLBlock>{`
<div class="product-faq" itemscope itemtype="https://schema.org/FAQPage">
  <h2>Fee Estimation FAQs</h2>

  
  <div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
    <details>
      <summary itemprop="name">What is a blockchain transaction fee?</summary>
      <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
        <div itemprop="text">
          <p>
            A transaction fee is the amount you pay to have your transaction processed and included on-chain. 
            On UTXO chains (e.g., Bitcoin) it’s based on <em>bytes</em> of your transaction; 
            on EVM chains (e.g., Ethereum) it’s based on <em>gas</em> used by execution steps.
          </p>
        </div>
      </div>
    </details>
  </div>

  
  <div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
    <details>
      <summary itemprop="name">How do I calculate Bitcoin fees?</summary>
      <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
        <div itemprop="text">
          <p>
            Multiply the current feerate (<strong>sat/vByte</strong>) by your transaction size in <strong>vBytes</strong>. 
            Size depends mainly on the number of inputs and outputs. 
            You can fetch recommended feerates via <code>GET /v3/blockchain/fee/BTC</code> or see a full example in the 
            <a href="/docs/btc-fee-estimate">BTC fee guide</a>.
          </p>
        </div>
      </div>
    </details>
  </div>

  
  <div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
    <details>
      <summary itemprop="name">How are Ethereum gas fees calculated?</summary>
      <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
        <div itemprop="text">
          <p>
            Ethereum uses EIP-1559: <strong>fee = gasUsed × (baseFee + priorityFee)</strong>. 
            Use <code>POST /v4/blockchainOperations/gas</code> to estimate <em>gasLimit</em> and <em>gasPrice</em> for your transaction, 
            or <code>GET /v3/blockchain/fee/ETH</code> for network <em>slow/standard/fast</em> suggestions.
          </p>
        </div>
      </div>
    </details>
  </div>

  
  <div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
    <details>
      <summary itemprop="name">How can I reduce gas costs?</summary>
      <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
        <div itemprop="text">
          <p>
            Prefer <em>standard</em> over <em>fast</em> during low congestion, batch operations where possible, 
            and consider L2s for smart-contract heavy workflows. Always refresh estimates right before sending.
          </p>
        </div>
      </div>
    </details>
  </div>

  
  <div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
    <details>
      <summary itemprop="name">Why is my transaction stuck or pending?</summary>
      <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
        <div itemprop="text">
          <p>
            The fee might be below current network conditions. 
            On Bitcoin-like chains, try rebroadcasting with a higher feerate (RBF/CPFP). 
            On EVM, increase priority fee (tip) or resubmit with a higher gas price.
          </p>
        </div>
      </div>
    </details>
  </div>

  
  <div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
    <details>
      <summary itemprop="name">What is the minimum relay fee?</summary>
      <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
        <div itemprop="text">
          <p>
            It’s the lowest feerate nodes accept to relay a transaction. 
            If your BTC/LTC/BCH fee is below that threshold, peers may ignore it. 
            See details in <a href="/docs/utxo-minimum-relay-fee">UTXO – Minimum relay fee</a>.
          </p>
        </div>
      </div>
    </details>
  </div>
</div>
`}</HTMLBlock>