> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.finrock.io/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /dac/v1/estimate-fee — Estimate Transaction Fee

> Calculate the expected network fee before submitting a transaction. Supply a fee_rate in chain-specific units; amount is required for UTXO chains.

The Estimate Fee endpoint calculates the expected network fee for a transaction before you submit it. Use this to show fee estimates to end users, validate that a wallet holds sufficient gas, or build fee-inclusive UIs. You supply a `fee_rate` expressed in the units appropriate for the target blockchain (see the table below), and for UTXO chains you must also supply the `amount` so the API can calculate transaction size. The response returns the total estimated fee denominated in the blockchain's native token.

## Fee Rate Units by Blockchain

Different blockchains use different units for their fee rate parameter. Use the table below to determine the correct unit for your `fee_rate` value.

| Blockchain | Example Assets            | `fee_rate` Unit |
| ---------- | ------------------------- | --------------- |
| UTXO       | BTC, LTC, DASH, DOGE, BCH | Sat/Byte        |
| EVM        | ETH, BSC, POL, BASE       | GWei            |
| Tron       | TRX                       | Sun             |
| Ripple     | XRP                       | Drop            |
| Stellar    | XLM                       | Stroop          |
| Cardano    | ADA                       | Lovelace        |
| Solana     | SOL                       | Lamport         |

## Request

<ParamField header="x-api-key" type="string" required>
  Your Finrock API key.
</ParamField>

<ParamField header="Authorization" type="string" required>
  Your JWT bearer token in the format `Bearer {JWT}`.
</ParamField>

<ParamField body="asset" type="string" required>
  The asset for which to estimate the fee. Use the `asset_name` value from the [Supported Assets](/api-reference/utilities/supported-assets) list (e.g. `BTC`, `ETH`, `USDT_ETH`).
</ParamField>

<ParamField body="amount" type="double">
  The amount to transfer in the asset's native unit. **Required for UTXO chains** (BTC, LTC, DASH, DOGE, BCH) because transaction size — and therefore fee — depends on the number of UTXOs selected to fund the transfer. Optional for non-UTXO chains.
</ParamField>

<ParamField body="fee_rate" type="float" required>
  The desired fee rate, expressed in the unit appropriate for the target blockchain (see the table above). For example, pass `20` for 20 GWei on an EVM chain, or `10` for 10 Sat/Byte on Bitcoin.
</ParamField>

## Example Request

<CodeGroup>
  ```bash EVM (ETH) theme={null}
  curl --request POST \
       --url https://api.finrock.io/dac/v1/estimate-fee \
       --header 'Authorization: Bearer {JWT}' \
       --header 'accept: application/json' \
       --header 'content-type: application/json' \
       --header 'x-api-key: YOUR_API_KEY' \
       --data '{
         "asset": "ETH",
         "fee_rate": 20
       }'
  ```

  ```bash UTXO (BTC) theme={null}
  curl --request POST \
       --url https://api.finrock.io/dac/v1/estimate-fee \
       --header 'Authorization: Bearer {JWT}' \
       --header 'accept: application/json' \
       --header 'content-type: application/json' \
       --header 'x-api-key: YOUR_API_KEY' \
       --data '{
         "asset": "BTC",
         "amount": 0.05,
         "fee_rate": 10
       }'
  ```
</CodeGroup>

## Response

A successful request returns HTTP `200` with the estimated fee.

<ResponseField name="asset" type="string">
  The asset for which the fee was estimated.
</ResponseField>

<ResponseField name="fee" type="number">
  The estimated network fee, denominated in the **blockchain's native token**. For token assets (e.g. `USDT_ETH`), the fee is returned in ETH, not in USDT.
</ResponseField>

<ResponseField name="fee_rate" type="number">
  The `fee_rate` value used for the estimate, echoed back in the response.
</ResponseField>

<ResponseField name="fee_rate_unit" type="string">
  The unit of the `fee_rate` used (e.g. `GWei`, `Sat/Byte`).
</ResponseField>

```json Sample 200 Response — ETH theme={null}
{
  "asset": "ETH",
  "fee": 0.00042000,
  "fee_rate": 20,
  "fee_rate_unit": "GWei"
}
```

```json Sample 200 Response — BTC theme={null}
{
  "asset": "BTC",
  "fee": 0.00002250,
  "fee_rate": 10,
  "fee_rate_unit": "Sat/Byte"
}
```

<ResponseField name="401" type="object">
  Returned when the `x-api-key` or `Authorization` header is missing or invalid.
</ResponseField>

```json Sample 401 Response theme={null}
{
  "error": "Unauthorized",
  "message": "Invalid or missing authentication credentials."
}
```

<Info>
  Fee estimates are approximate and based on current network conditions at the time of the request. The actual fee deducted when the transaction is confirmed may differ if network congestion changes between the estimate and submission.
</Info>
