---
updatedAt: 2026-05-20T16:41:57.000Z
---

Fetch the complete documentation index at: https://docs.blockdaemon.com/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# Get the Fee Estimation

Returns the estimated fee for a given chain.

<Callout icon="💡" theme="default">
  ### **Compute Unit Value**: `50` (fixed)
</Callout>

Fee estimation is integrated within the Transaction API and **is not a standalone endpoint.**&#x57;hen you send a transaction, the fee is automatically deducted from the sender's wallet.

**How It Works?**

It estimates the cost of sending a transaction, which can be either signed or unsigned. If unsigned, the estimation assumes the size of a single signature. The estimation includes:

* **Bandwidth**: The data size of the transaction.
* **Energy**: The computational resources needed if it's a smart contract transaction.
* **Additional Fees**: Any extra costs for specific contract types.

***

> 👍 START HERE!
>
> Click **Try It!** to test the endpoint with the default values or customize your request by following these steps:
>
> 1. Enter your API key in the **Header: token** text box (top right).
>    * You can **[get a free API key here](https://docs.blockdaemon.com/docs/quick-start-blockdaemon-api-suite)** .
> 2. Enter the parameters available below.
> 3. Click **Try It!**.

***

<HTMLBlock>{`
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
  body {
    font-family: Arial, sans-serif;
  }
  .filter-box {
  	width: 100%;
  }
  .table-container {
    border: 1px solid #ccc;
    margin-top: 15px;
  }
  .show {
    display: block;
  }
  .scrollable-table {
    max-height: 320px; /* Approx height for 5 rows */
    overflow-y: scroll; /* Always show scrollbar */
  }
  table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }
  th, td {
    border: 1px solid #ccc;
    padding: 10px;
    vertical-align: top;
    word-wrap: break-word;
  }
  #protocolTableSearchable th {
    text-align: left;
    position: sticky;
    top: 0;
    background-clip: padding-box;
    z-index: 1;
    background-color: #230688;
    color: white !important;
  }
  code {
    background-color: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
  }
  code:hover {
    background-color: #ddd;
  }
  [data-color-mode="dark"] code:hover {
    background-color: #637288;
  }
  /* Tooltip styles */
  .tooltip {
    position: absolute;
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-family: Arial, sans-serif;
  }
  .tooltip.show {
    opacity: 1;
  }
  .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
  }
  /* Only two colors: white and light gray */
  [data-color-mode="light"] .protocol-group-odd td {
    background-color: #ffffff; /* white */
  }
  [data-color-mode="light"] .protocol-group-even td {
    background-color: #f5f5f5; /* light gray */
  }

  [data-color-mode="dark"] .protocol-group-odd td {
    background-color: #242e34; /* dark gray */
  }
  [data-color-mode="dark"] .protocol-group-even td {
    background-color: #4f5a66; /* lighter gray */
  }
</style>
</head>
<body>

<h3>Supported Protocols & Networks</h3>

<div class="table-container show">
  <input type="text" id="searchProtocolInput" class="filter-box" placeholder="Search protocol name..." onkeyup="filterTable()" />
  <div class="scrollable-table">
    <table id="protocolTableSearchable">
<thead>
  <tr>
    <th>Protocol</th>
    <th>Network</th>
    <th>Path Parameter</th>
  </tr>
</thead>
<tbody>
  <tr class="protocol-group-odd">
    <td rowspan="2">Stellar</td>
    <td>Mainnet</td>
    <td><code class="copyable-code">stellar-mainnet</code></td>
  </tr>
  <tr class="protocol-group-odd">
    <td>Testnet</td>
    <td><code class="copyable-code">stellar-testnet</code></td>
  </tr>
  <tr class="protocol-group-even">
    <td rowspan="2">Tron</td>
    <td>Mainnet</td>
    <td><code class="copyable-code">tron-mainnet</code></td>
  </tr>
  <tr class="protocol-group-even">
    <td>Nile</td>
    <td><code class="copyable-code">tron-nile</code></td>
  </tr>
</tbody>
    </table>
  </div>
</div>
</body>
</html>
`}</HTMLBlock>

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Transaction API",
    "version": "1.0.0",
    "description": "Blockdaemon transaction API to create, compile, send and verify transactions for supported blockchains.",
    "contact": {
      "name": "Blockdaemon",
      "email": "info@blockdaemon.com",
      "url": "https://blockdaemon.com"
    },
    "x-logo": {
      "url": "https://storage.googleapis.com/blockdaemon-app-static-images/marketing/PNG/dark-logo.png",
      "altText": "Blockdaemon logo"
    }
  },
  "servers": [
    {
      "url": "https://svc.blockdaemon.com/tx/v1",
      "description": "Blockdaemon transaction API"
    }
  ],
  "security": [
    {
      "apiKeyAuthHeader": []
    },
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/{blockchain_id}/estimate_fee": {
      "parameters": [
        {
          "$ref": "#/components/parameters/blockchain_id"
        }
      ],
      "post": {
        "summary": "Get the Fee Estimation",
        "description": "Returns the estimated fee for a given chain.",
        "operationId": "TxEstimateFee",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTxEstimateFeeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTxEstimateFeeResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorUnauthorized"
          },
          "429": {
            "$ref": "#/components/responses/ErrorTooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ErrorInternal"
          },
          "501": {
            "$ref": "#/components/responses/ErrorNotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/ErrorServiceUnavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuthHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Unlock higher TPS - Create your own API key in the [Blockdaemon App](https://app.blockdaemon.com).\n",
        "x-default": "2go1YqUcuAr4WZ2-3WgSD3c7qpatZqQuNWhTVBldKZnTSUtw"
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Opaque",
        "description": "[Legacy Auth] Unlock higher TPS - Create your own API key in the [Blockdaemon App](https://app.blockdaemon.com).\n",
        "x-default": "2go1YqUcuAr4WZ2-3WgSD3c7qpatZqQuNWhTVBldKZnTSUtw"
      }
    },
    "parameters": {
      "blockchain_id": {
        "name": "blockchain_id",
        "in": "path",
        "required": true,
        "description": "Either a hyphen seperated protocol-network pair like `ethereum-mainnet` or the `chain-id`",
        "schema": {
          "type": "string",
          "default": "ethereum-mainnet"
        }
      }
    },
    "responses": {
      "ErrorTooManyRequests": {
        "description": "Rate limit exceeded",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "example": {
              "type": "too-many-requests",
              "title": "Too Many Requests",
              "status": 429,
              "detail": "Request rate limits have been exceeded. Try again after a few seconds."
            }
          }
        }
      },
      "ErrorUnauthorized": {
        "description": "Invalid or expired token",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "example": {
              "type": "unauthorized",
              "title": "Invalid Token",
              "status": 401
            }
          }
        }
      },
      "ErrorInternal": {
        "description": "An internal server error happened",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "example": {
              "type": "internal-server-error",
              "title": "Internal Server Error",
              "status": 500
            }
          }
        }
      },
      "ErrorServiceUnavailable": {
        "description": "The resource you are trying to access is currently unavailable",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "example": {
              "type": "unavailable",
              "title": "Unavailable",
              "status": 503
            }
          }
        }
      },
      "ErrorNotImplemented": {
        "description": "The request endpoint is not implemented",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "example": {
              "type": "not-implemented",
              "title": "Not implemented",
              "status": 501
            }
          }
        }
      }
    },
    "schemas": {
      "ApiTxEstimateFeeRequest": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ApiTxEstimateFeeRequestTron"
          },
          {
            "$ref": "#/components/schemas/ApiTxEstimateFeeRequestStellar"
          }
        ]
      },
      "ApiTxEstimateFeeRequestTron": {
        "title": "Api Tx Estimate Fee Request Tron",
        "type": "object",
        "properties": {
          "tx": {
            "type": "string",
            "description": "the transaction in protobuf hex encoding",
            "x-oapi-codegen-extra-tags": {
              "validate": "required"
            }
          }
        },
        "required": [
          "tx"
        ]
      },
      "ApiTxEstimateFeeRequestStellar": {
        "title": "Api Tx Estimate Fee Request Stellar",
        "type": "object",
        "properties": {
          "smart_contract": {
            "type": "boolean",
            "description": "Is the transaction interacting with smart contracts, transactions interacting with smart contracts compete separately from native transactions for more limited resources as a result they typically pay higher fees.",
            "default": false,
            "x-go-type-skip-optional-pointer": true
          }
        }
      },
      "ApiTxEstimateFeeResponse": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ApiTxEstimateFeeResponseTron"
          },
          {
            "$ref": "#/components/schemas/ApiTxEstimateFeeResponseStellar"
          }
        ]
      },
      "ApiTxEstimateFeeResponseStellar": {
        "title": "Api Tx Estimate Fee Response Stellar",
        "type": "object",
        "properties": {
          "most_recent_block": {
            "type": "integer",
            "x-go-type": "big.Int"
          },
          "estimated_fees": {
            "$ref": "#/components/schemas/ApiTxEstimateFeeStellar"
          }
        }
      },
      "ApiTxEstimateFeeStellar": {
        "title": "Api Tx Estimate Fee Stellar",
        "type": "object",
        "x-go-type-skip-optional-pointer": true,
        "properties": {
          "fast": {
            "type": "integer",
            "x-go-type": "big.Int"
          },
          "medium": {
            "type": "integer",
            "x-go-type": "big.Int"
          },
          "slow": {
            "type": "integer",
            "x-go-type": "big.Int"
          }
        }
      },
      "ApiTxEstimateFeeResponseTron": {
        "title": "Api Tx Estimate Fee Response Tron",
        "type": "object",
        "properties": {
          "account_resources": {
            "$ref": "#/components/schemas/TronAccountResources"
          },
          "contract_resources": {
            "$ref": "#/components/schemas/TronAccountResources"
          },
          "estimated_cost": {
            "$ref": "#/components/schemas/TronAccountResources"
          },
          "estimated_energy": {
            "type": "integer",
            "x-go-type": "int64",
            "x-go-type-skip-optional-pointer": true
          },
          "estimated_bandwidth": {
            "type": "integer",
            "x-go-type": "int64",
            "x-go-type-skip-optional-pointer": true
          },
          "energy_distribution": {
            "$ref": "#/components/schemas/TronEnergyDistribution"
          },
          "sun_fee": {
            "$ref": "#/components/schemas/TronSunFeeDetails"
          },
          "estimated_tx_status": {
            "type": "string",
            "enum": [
              "success",
              "failed"
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "account_resources",
          "estimated_cost",
          "estimated_energy",
          "estimated_bandwidth",
          "estimated_tx_status"
        ]
      },
      "TronAccountResources": {
        "type": "object",
        "properties": {
          "sun": {
            "type": "integer",
            "x-go-type": "int64",
            "x-go-type-skip-optional-pointer": true
          },
          "free_bandwidth": {
            "type": "integer",
            "x-go-type": "int64",
            "x-go-type-skip-optional-pointer": true
          },
          "bandwidth": {
            "type": "integer",
            "x-go-type": "int64",
            "x-go-type-skip-optional-pointer": true
          },
          "energy": {
            "type": "integer",
            "x-go-type": "int64",
            "x-go-type-skip-optional-pointer": true
          },
          "contract_energy": {
            "type": "integer",
            "x-go-type": "int64"
          }
        }
      },
      "TronEnergyDistribution": {
        "type": "object",
        "properties": {
          "sender_usage_percentage": {
            "type": "integer",
            "x-go-type": "int64",
            "x-go-type-skip-optional-pointer": true
          },
          "contract": {
            "type": "integer",
            "x-go-type": "int64",
            "x-go-type-skip-optional-pointer": true
          },
          "sender": {
            "type": "integer",
            "x-go-type": "int64",
            "x-go-type-skip-optional-pointer": true
          }
        }
      },
      "TronSunFeeDetails": {
        "type": "object",
        "properties": {
          "sun_for_energy": {
            "type": "integer",
            "x-go-type": "int64",
            "x-go-type-skip-optional-pointer": true
          },
          "sun_for_contract_energy": {
            "type": "integer",
            "x-go-type": "int64",
            "x-go-type-skip-optional-pointer": true
          },
          "sun_for_bandwidth": {
            "type": "integer",
            "x-go-type": "int64",
            "x-go-type-skip-optional-pointer": true
          },
          "other": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fee": {
                  "type": "integer",
                  "x-go-type": "int64",
                  "x-go-type-skip-optional-pointer": true
                },
                "contract_type": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "error": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The HTTP error type.",
            "example": "bad-request"
          },
          "code": {
            "type": "integer",
            "description": "The numeric error code.",
            "example": 16384
          },
          "title": {
            "type": "string",
            "description": "The short error description.",
            "example": "Invalid Address"
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status of the error.",
            "example": 400
          },
          "detail": {
            "type": "string",
            "description": "Long error description",
            "example": "The requested address is invalid on this protocol."
          }
        }
      }
    }
  }
}
```