Estimate Fees

Estimate blockchain fees for transactions and check gas tank balances. See the Guide.

  1. Estimate the blockchain fee at the time you initiate a transaction. UTXO-based coins return a fee per kB, while account-based coins return a flat fee. BitGo reassesses the actual fee when it receives the final signature, so the sooner your wallet users sign, the more accurate the estimate.

    The fee estimate provided by BitGo is higher than the usual network fee. BitGo does not charge this additional fee, but it ensures that transactions process faster and do not fail on the blockchain network.

    Prerequisites: Complete Get Started, Create Wallets, and build an unsigned transaction.

    API Reference

  2. All tokens on the Ethereum network require a gas tank. If you have an Ethereum-based wallet, you must maintain enough ETH to cover gas fees. BitGo stores this balance in a separate address from the rest of your wallet balance.

    API Reference

// 1. Estimate Fees
export COIN="<ASSET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"

curl -X GET \
  https://app.bitgo-test.com/api/v2/$COIN/tx/fee \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
// 2. Check Gas Tank Balance
export ENTERPRISE_ID="<YOUR_ENTERPRISE_ID>"

curl -X GET \
  https://app.bitgo-test.com/api/v2/$COIN/enterprise/$ENTERPRISE_ID/feeAddressBalance \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
// 1. Estimate Fees Response
{
  "feePerKb": 15902,
  "cpfpFeePerKb": 0,
  "numBlocks": 2,
  "confidence": 80,
  "multiplier": 0,
  "feeByBlockTarget": {
    "1": 50536,
    "2": 15902,
    "3": 1579
  }
}

// 2. Check Gas Tank Balance Response
{
  "balance": "string"
}