Calculate mining fee

post/api/v2/calculateminerfeeinfo

Calculate the fee and estimated size in bytes for a Bitcoin transaction

Request Body

feeRateOne of
Custom minimum fee rate in a coin's base unit per kilobyte (or virtual kilobyte)--for example, satoshis per kvByte or microAlgos per kByte. If the applied 'feeRate' does not meet a coin's required minimum transaction fee amount, the minimum is still applied (for example, 1000 sat/kvByte or a flat 1000 microAlgos).
Example: null
nP2shInputs integer
Number of P2SH (multi-signature) inputs
Example: 2
nP2pkhInputs integer
Number of P2PKH (single-signature) inputs
Example: 0
nP2shP2wshInputs integer
Number of P2SH_P2WSH (wrapped segwit multi-signature) inputs
Example: 1
nOutputs integer required
Number of outputs
Example: 2

200 Response

size integer
Estimated size of the transaction in bytes
Example: 776
fee integer
Estimated fee in base units for the transaction
Example: 38800
feeRate integer
The fee rate in base units per kB used to estimate the fee for the transaction
Example: 50000