estimateFee - Bitcoin Cash

Returns the backend fee estimate for one or more confirmation targets. Supplying the transaction's size returns the estimated total fee alongside the per-unit rate.

Parameters

ParameterTypeRequiredDescription
blocksarrayYesConfirmation targets in blocks, one estimate returned per entry
specificobjectNoChain-specific options: conservative for smart fee mode, txsize in bytes

Message

bashwscat -c wss://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>

# then send:
{
    "id": "getblock.io",
    "method": "estimateFee",
    "params": {
        "blocks": [1, 6, 12],
        "specific": {
            "conservative": true,
            "txsize": 226
        }
    }
}

Response

json{
    "id": "getblock.io",
    "data": [
        {
            "feePerTx": "226",
            "feePerUnit": "1000"
        },
        {
            "feePerTx": "226",
            "feePerUnit": "1000"
        },
        {
            "feePerTx": "226",
            "feePerUnit": "1000"
        }
    ]
}

Results are returned in the same order as the requested blocks targets.

Response Fields

FieldTypeDescription
feePerTxstringEstimated total fee in satoshis for a transaction of the supplied txsize
feePerUnitstringEstimated fee rate in satoshis per kilobyte, not per byte

feePerUnit is quoted per 1000 bytes, following the node's estimatesmartfee, which reports BCH per kilobyte. It is an integer count of satoshis, not a decimal BCH amount. Dividing by 1000 gives the sat/byte rate wallets display: the 1000 above is 1 sat/byte, the network relay minimum.

feePerTx is derived as txsize x feePerUnit / 1000; in the response above, 226 x 1000 / 1000 = 226.

Bitcoin Cash blocks are rarely full, so the estimate usually sits at the 1 sat/byte relay minimum for every target. Identical values across 1, 6 and 12 blocks are expected rather than a fault.

Use Cases

  • Fee Selection: Choose a rate matching the confirmation speed a payment needs
  • Cost Preview: Show the user the fee before signing
  • Batch Planning: Size a consolidation against the current rate

Error Handling

ErrorMessageDescription
errorInvalid paramsThe blocks array is missing or malformed
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect