Skip to main content

estimatesmartfee

Returns the number of blocks for which the estimate is valid and estimates the approximate fee per kilobyte required for a transaction to start confirmation within conf_target blocks, if at all possible. employs the BIP 141 definition of virtual transaction size (witness data is discounted).

Example Request and Result for estimatesmartfee method

In this section, we provide an illustrative example of a request made to retrieve details contents using the estimatesmartfee method. Additionally, we present the resulting response containing information about the number of blocks for which the estimate is valid.

Parameters

FieldTypeDescription

conf_target*

stringConfirmation target in blocks (1 - 1008)
estimate_modestring

If a more cautious estimate that satisfies a longer history should be returned. Although a conservative estimate is less sensitive to sudden declines in the current fee market, it may yield a higher feerate and be more sufficient for the intended goal. Three must apply: "UNSET," "ECONOMICAL," and "CONSERVATIVE."

info

The example in this section uses a non-existing project id.

Make sure you replace it with your Bitcoin mainnet or Bitcoin Testnet endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Provides the number of blocks for which the estimate is valid

POST https://bitcoin-mainnet.blastapi.io/<project-id>

Request Body

NameTypeDescription
jsonrpc*string1.0
id*stringbwarelabs
method*stringestimatesmartfee
params*string[6]
{
"result": {
"feerate": 0.00021051,
"blocks": 6
},
"error": null,
"id": "bwarelabs"
}

Curl Request example

curl --location 'https://bitcoin-mainnet.blastapi.io/<project-id>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "1.0",
"id": "bwarelabs",
"method": "estimatesmartfee",
"params": [
6
]
}'