0RPCHelpMan{"estimatesmartfee",
1 "\nEstimates the approximate fee per kilobyte needed for a transaction to begin\n"
2 "confirmation within conf_target blocks if possible and return the number of blocks\n"
3 "for which the estimate is valid. Uses virtual transaction size as defined\n"
4 "in BIP 141 (witness data is discounted).\n",
5 {
6 {"conf_target", RPCArg::Type::NUM, RPCArg::Optional::NO, "Confirmation target in blocks (1 - 1008)"},
7 {"estimate_mode", RPCArg::Type::STR, /* default */ "CONSERVATIVE", "The fee estimate mode.\n"
8" Whether to return a more conservative estimate which also satisfies\n"
9" a longer history. A conservative estimate potentially returns a\n"
10" higher feerate and is more likely to be sufficient for the desired\n"
11" target, but is not as responsive to short term drops in the\n"
12" prevailing fee market. Must be one of:\n"
13" \"UNSET\"\n"
14" \"ECONOMICAL\"\n"
15" \"CONSERVATIVE\""},
16 },
17 RPCResult{
18"{\n"
19" \"feerate\" : x.x, (numeric, optional) estimate fee rate in " + CURRENCY_UNIT + "/kB\n"
20" \"errors\" : [ str... ] (json array of strings, optional) Errors encountered during processing\n"
21" \"blocks\" : n (numeric) block number where estimate was found\n"
22"}\n"
23"\n"
24"The request target will be clamped between 2 and the highest target\n"
25"fee estimation is able to return based on how long it has been running.\n"
26"An error is returned if not enough transactions and blocks\n"
27"have been observed to make an estimate for any number of blocks.\n"
28 },
29 RPCExamples{
30 HelpExampleCli("estimatesmartfee", "6")
31 },
32}.Check(request);
To me it’s not very clear what the "blocks"
return value actually means.
- Is it supposed to be a block height or a block height
- Is it the block height at which a tx with the given fee is supposed to go in?
- Or does it indicate for how long I can reliably keep using the same estimation?
Some improvements of this documentation would be appreciated. If someone can explain it here, I can make the PR myself if that’s preferred.