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
Field | Type | Description |
---|---|---|
conf_target* | string | Confirmation target in blocks (1 - 1008) |
estimate_mode | string | 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." |
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
Name | Type | Description |
---|---|---|
jsonrpc* | string | 1.0 |
id* | string | bwarelabs |
method* | string | estimatesmartfee |
params* | string | [6] |
- 200: OK
{
"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
]
}'