REST APIWallet & TransactTransfer

GET

Returns the estimated fee for a transaction. UTXO coins will return a fee per kB, while Account-based coins will return a flat fee estimate.

The fee estimate provided by BitGo is higher than the usual network fee. This additional fee is not charged by BitGo but is used to ensure that the transactions are processed faster and do not fail on the blockchain network.

Path Params

  • coin string required
    A cryptocurrency or token ticker symbol.

Query Params

  • numBlocks integer
    target number of blocks
  • recipient string
    Recipient of the tx to estimate for (only for ETH)
  • data string
    ETH data of the tx to estimate for (only for ETH)
  • amount string
    Amount in base units being sent to estimate for (only for ETH)
  • hop boolean
    True if we are estimating for a hop tx, false or unspecified for a wallet tx (ETH, AVAXC and POLYGON)

Responses

200
OK

Response Body

ONE OF

  • feePerKb integer required
    (BTC only) The fee (in base units) per kilobyte (or virtual kilobyte) required to confirm a transaction on 2 or more blocks.
  • cpfpFeePerKb integer
    (BTC only) Child-Pays-For-Parent (CPFP) fee (in base units) per kilobyte (or virtual kilobyte). Includes the fees for all unconfirmed transactions dependent on the CPFP transaction.
  • numBlocks integer required

    (BTC only) The number of blocks required to confirm a transaction. You can use numBlocks to estimate the fee rate by targeting confirmation within a given number of blocks. If both feeRate and numBlocks are absent, the transaction defaults to 2 blocks for confirmation.

    Note: The maxFeeRate limits the fee rate generated by numBlocks.

  • confidence integer
    (BTC only) The confidence (as a percentage) in the accuracy of the fee estimate.

    >= 0 · <= 100

  • feeByBlockTarget object

    (UTXO only) Custom multiplier to the feeRate. The resulting fee rate is limited by the maxFeeRate. For replace-by-fee (RBF) transactions (that include rbfTxIds), the feeMultiplier must be greater than 1, since it's an absolute fee multiplier to the transaction being replaced.

    Note: The maxFeeRate limits the fee rate generated by feeMultiplier.

400
Bad Request

Response Body

object

  • error string required
    Human-readable error message
  • requestId string required
    Client request id
  • context object
    Properties that apply to a specific error name
  • name string required
    Error code