---
title: "Get the Fee Estimation"
method: POST
path: "/{blockchain_id}/estimate_fee"
---

# Get the Fee Estimation

`POST /{blockchain_id}/estimate_fee`

Returns the estimated fee for a given chain.

## Request body

- union
  - ApiTxEstimateFeeRequestTron
    - `tx` string, required — the transaction in protobuf hex encoding
  - ApiTxEstimateFeeRequestStellar
    - `smart_contract` boolean — 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.

## Response `200`

OK

- union
  - ApiTxEstimateFeeResponseTron
    - `account_resources` TronAccountResources, required
      - `sun` integer
      - `free_bandwidth` integer
      - `bandwidth` integer
      - `energy` integer
      - `contract_energy` integer
    - `contract_resources` TronAccountResources
      - `sun` integer
      - `free_bandwidth` integer
      - `bandwidth` integer
      - `energy` integer
      - `contract_energy` integer
    - `estimated_cost` TronAccountResources, required
      - `sun` integer
      - `free_bandwidth` integer
      - `bandwidth` integer
      - `energy` integer
      - `contract_energy` integer
    - `estimated_energy` integer, required
    - `estimated_bandwidth` integer, required
    - `energy_distribution` TronEnergyDistribution
      - `sender_usage_percentage` integer
      - `contract` integer
      - `sender` integer
    - `sun_fee` TronSunFeeDetails
      - `sun_for_energy` integer
      - `sun_for_contract_energy` integer
      - `sun_for_bandwidth` integer
      - `other` object[]
        - `fee` integer
        - `contract_type` string
    - `estimated_tx_status` 'success' | 'failed', required
    - `error` string
  - ApiTxEstimateFeeResponseStellar
    - `most_recent_block` integer
    - `estimated_fees` ApiTxEstimateFeeStellar
      - `fast` integer
      - `medium` integer
      - `slow` integer

## Other responses

- `401` — Invalid or expired token
- `429` — Rate limit exceeded
- `500` — An internal server error happened
- `501` — The request endpoint is not implemented
- `503` — The resource you are trying to access is currently unavailable

---

[API](https://skmtc.net/blockdaemon/apis/staking-api.md) · [All operations](https://skmtc.net/blockdaemon/apis/staking-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/blockdaemon/staking-api/versions/f94e296a08a3/schema)
