Skip to main content
POST
/
transactions
/
estimate_fee
TypeScript
const response: Promise<FireblocksResponse<EstimatedTransactionFeeResponse>> = fireblocks.transactions.estimateTransactionFee(transactionsApiEstimateTransactionFeeRequest);
{
  "low": {
    "feePerByte": "<string>",
    "gasPrice": 123,
    "gasLimit": "<string>",
    "networkFee": "<string>",
    "baseFee": 123,
    "priorityFee": 123,
    "maxFeePerGasDelta": "<string>",
    "l1Fee": "<string>"
  },
  "medium": {
    "feePerByte": "<string>",
    "gasPrice": 123,
    "gasLimit": "<string>",
    "networkFee": "<string>",
    "baseFee": 123,
    "priorityFee": 123,
    "maxFeePerGasDelta": "<string>",
    "l1Fee": "<string>"
  },
  "high": {
    "feePerByte": "<string>",
    "gasPrice": 123,
    "gasLimit": "<string>",
    "networkFee": "<string>",
    "baseFee": 123,
    "priorityFee": 123,
    "maxFeePerGasDelta": "<string>",
    "l1Fee": "<string>"
  },
  "feeDetails": {
    "low": {
      "baseFee": "<string>",
      "priorityFee": "<string>",
      "rent": "<string>",
      "totalFee": "<string>"
    },
    "medium": {
      "baseFee": "<string>",
      "priorityFee": "<string>",
      "rent": "<string>",
      "totalFee": "<string>"
    },
    "high": {
      "baseFee": "<string>",
      "priorityFee": "<string>",
      "rent": "<string>",
      "totalFee": "<string>"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://fireblocks-43c4b3ee-chore-add-cli.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Headers

Idempotency-Key
string

A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.

Body

application/json
operation
enum<string>
default:TRANSFER
  • TRANSFER - The default value for an operation. Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address.

  • MINT - Mints new tokens. Supported for Stellar, Ripple and EVM-based blockchains.

  • BURN - Burns tokens. Supported for Stellar, Ripple and EVM-based blockchains.

  • CONTRACT_CALL - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks development libraries are recommended for building contract call transactions.

  • PROGRAM_CALL - Execute multiple instructions on Solana blockchain. The @solana/web3.js library is recommended for building program call transactions.

  • TYPED_MESSAGE - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. Learn more about typed messages.

  • RAW - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. Learn more about raw signing transactions.

  • APPROVE - Enables the approve function for a smart contract or wallet to withdraw from a designated wallet. Learn more.

  • ENABLE_ASSET - Algorand, DigitalBits, Solana, and Stellar require an on-chain transaction to create an asset wallet and enable the deposit address. This transaction is automatically created when adding assets on these blockchains at a vault account.

Available options:
TRANSFER,
BURN,
CONTRACT_CALL,
PROGRAM_CALL,
MINT,
RAW,
TYPED_MESSAGE,
APPROVE,
ENABLE_ASSET
note
string

Custom note, not sent to the blockchain, to describe the transaction at your Fireblocks workspace.

Example:

"Ticket 123"

externalTxId
string

This parameter allows you to add a unique ID of your own to help prevent duplicate transactions. No specific format is required for this parameter. After you submit a transaction with an external ID, Fireblocks will automatically reject all future transactions with the same ID. Using an external ID primarily helps in situations where, even though a submitted transaction responds with an error due to an internet outage, the transaction was still sent to and processed on the blockchain. Use the Get a specific transaction by external transaction ID endpoint to validate whether these transactions have been processed.

Example:

"00000000-0000-0000-0000-000000000000"

assetId
string

The ID of the asset to transfer, for TRANSFER, MINT or BURN operations. See the list of supported assets and their IDs on Fireblocks.

Example:

"ETH"

source
object

The source of the transaction.

destination
object

The destination of the transaction.

destinations
object[]

For UTXO based blockchains, you can send a single transaction to multiple destinations.

amount

For TRANSFER operations, the requested amount to transfer, in the asset’s unit. Fireblocks recommends using a numeric string for accurate precision. Although a number input exists, it is deprecated.

Example:

"0.02"

treatAsGrossAmount
boolean

"When set to true, the fee will be deducted from the requested amount."

Note: This parameter can only be considered if a transaction’s asset is a base asset, such as ETH or MATIC. If the asset can’t be used for transaction fees, like USDC, this parameter is ignored and the fee is deducted from the relevant base asset wallet in the source account.

Example:

false

forceSweep
boolean

For Polkadot, Kusama and Westend transactions only. When set to true, Fireblocks will empty the asset wallet.

Note: If set to true when the source account is exactly 1 DOT, the transaction will fail. Any amount more or less than 1 DOT succeeds. This is a Polkadot blockchain limitation.

Example:

false

feeLevel
enum<string>

For UTXO, EVM-based, or Solana blockchains only. Defines the blockchain fee level which will be payed for the transaction. Alternatively, specific fee estimation parameters exist below.

Available options:
LOW,
MEDIUM,
HIGH
Example:

"MEDIUM"

fee

For UTXO-based blockchains, the fee per bytes in the asset’s smallest unit (Satoshi, Latoshi, etc.). For Ripple, the fee for the transaction. Fireblocks recommends using a numeric string for accurate precision. Although a number input exists, it is deprecated.

priorityFee

For Ethereum-based blockchains only, the fee for EIP-1559 transaction pricing mechanism. Value is in Gwei. Fireblocks recommends using a numeric string for accurate precision. Although a number input exists, it is deprecated.

Example:

"2"

failOnLowFee
boolean

When set to true, in case the current MEDIUM fee level is higher than the one specified in the transaction, the transaction will fail to avoid getting stuck with no confirmations.

maxFee
string

The maximum fee (gas price or fee per byte) that should be payed for the transaction. In case the current value of the requested feeLevel is higher than this requested maximum fee. Represented by a numeric string for accurate precision.

Example:

"120"

maxTotalFee
string

For BTC-based blockchains only. The maximum fee (in the units of the fee-paying asset) that should be paid for the transaction.

Example:

"88"

gasLimit

For EVM-based blockchains only. Units of gas required to process the transaction. Note: Only two of the three arguments can be specified in a single transaction: gasLimit, gasPrice and networkFee. Fireblocks recommends using a numeric string for accurate precision. Although a number input exists, it is deprecated.

Example:

"21000"

gasPrice

For non-EIP-1559, EVM-based transactions. Price per gas unit (in Ethereum this is specified in Gwei). Note: Only two of the three arguments can be specified in a single transaction: gasLimit, gasPrice and networkFee. Fireblocks recommends using a numeric string for accurate precision. Although a number input exists, it is deprecated.

networkFee

For EVM-based blockchains only. The total transaction fee in the blockchain’s largest unit. Note: Only two of the three arguments can be specified in a single transaction: gasLimit, gasPrice and networkFee. Fireblocks recommends using a numeric string for accurate precision. Although a number input exists, it is deprecated. - The transaction blockchain fee.

  • For Ethereum, you can't pass gasPrice, gasLimit and networkFee all together.
  • A numeric value representation is required.
replaceTxByHash
string

For EVM-based blockchains only. In case a transaction is stuck, specify the hash of the stuck transaction to replace it by this transaction with a higher fee, or to replace it with this transaction with a zero fee and drop it from the blockchain.

Example:

"00000000-0000-0000-0000-000000000000"

extraParameters
object

Additional protocol / operation specific key-value parameters:

For UTXO-based blockchain input selection, add the key inputsSelection with the value set to the input selection structure. The inputs can be retrieved from the Retrieve Unspent Inputs endpoint.

For RAW operations, add the key rawMessageData with the value set to the raw message data structure.

For CONTRACT_CALL operations, add the key contractCallData with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks development libraries are recommended for building contract call transactions. For exchange compliance (e.g., Binance) and Travel Rule purposes, include the key piiData containing a custom JSON structure with Personally Identifiable Information (PII) relevant to the transaction. This data must be fully encrypted by the sender before being submitted to the Fireblocks API. The recommended encryption method is hybrid encryption using AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange's public key. development libraries

Note: rawMessageData, contractCallData, and inputsSelection cannot be used together in the same call.

utxoSelectionParams
object

For UTXO-based blockchains only. Controls which UTXOs are used for automatic selection. Cannot be used together with extraParameters.inputsSelection. This feature is currently in beta and might be subject to changes.

customerRefId
string

The ID for AML providers to associate the owner of funds with transactions.

Example:

"abcdef"

travelRuleMessage
object
travelRuleMessageId
string

The ID of the travel rule message from any travel rule provider. Used for travel rule supporting functionality to associate transactions with existing travel rule messages.

Example:

"trm_12345678-1234-1234-1234-123456789012"

autoStaking
boolean
deprecated

This feature is no longer supported.

networkStaking
deprecated

This feature is no longer supported.

cpuStaking
deprecated

This feature is no longer supported.

useGasless
boolean
  • Override the default gasless configuration by sending true\false

Response

Estimated fees response

low
object
required
medium
object
required
high
object
required
feeDetails
object

Optional detailed fee breakdown for high/medium/low estimates