> ## 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.

# Gas Fees

> Network fee units for each blockchain Finrock supports, plus how to fetch current fee rates and estimate a transaction fee before you submit it.

Network fees are the on-chain costs paid to miners or validators to process a transaction. This page covers how fee units differ by blockchain type, how to query current fee rates, and how to estimate the fee for a specific transaction before you submit it.

Finrock exposes two endpoints for working with network fees: one to retrieve the current fee rates for any supported asset, and one to estimate the total fee for a specific transaction before you submit it.

## Fee Rate Units by Blockchain

Every blockchain family uses a different unit to express fee rates. Provide values in the correct unit when calling fee-related endpoints:

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

## Get Current Fee Rates

Use the fee rates endpoint to retrieve the current network fee rates for a given asset. This is useful for building a fee selection UI or for pre-flight checks before submitting high-value transactions.

```text theme={null}
GET https://api.finrock.io/dac/v1/network-fee-rates/{asset}
```

Replace `{asset}` with the asset ticker (e.g., `BTC`, `USDT_ETH`). This endpoint requires authentication.

```bash cURL theme={null}
curl --request GET \
     --url https://api.finrock.io/dac/v1/network-fee-rates/BTC \
     --header 'Authorization: Token {JWT}' \
     --header 'accept: application/json' \
     --header 'x-api-key: YOUR_API_KEY'
```

## Estimate Transaction Fee

Before submitting a transaction, you can call the fee estimate endpoint to calculate the total network fee for a given asset, amount (required for UTXO chains), and your chosen fee rate.

```text theme={null}
POST https://api.finrock.io/dac/v1/estimate-fee
```

**Request body parameters:**

**asset** `string` *required*

The asset ticker as returned by the `/assets` endpoint (e.g., `BTC`, `USDT_ETH`).

**fee\_rate** `float` *required*

The fee rate in the unit appropriate for the asset's blockchain (see the table above).

**amount** `double`

The transfer amount. Required for UTXO-based chains (BTC, LTC, DASH, DOGE, BCH) because the fee depends on transaction size, which varies with the number of inputs and the amount.

```bash cURL (BTC example) theme={null}
curl --request POST \
     --url https://api.finrock.io/dac/v1/estimate-fee \
     --header 'Authorization: Token {JWT}' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-api-key: YOUR_API_KEY' \
     --data '{
       "asset": "BTC",
       "amount": 0.5,
       "fee_rate": 25
     }'
```

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

> [!TIP]
>
> For UTXO chains, always include the `amount` field when calling `estimate-fee`. The fee depends on how many unspent outputs (UTXOs) the platform needs to consolidate to fund the transfer — omitting the amount will result in an inaccurate estimate.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.