From bada19a8e840a8783276d33a7e1032e3be408524 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 29 Jul 2023 20:14:28 +0000 Subject: [PATCH] rest: add endpoint for estimatesmartfee * write REST interface for getting estimated fee * update docs about REST interface for fee estimation * add test --- doc/REST-interface.md | 6 +++ src/rest.cpp | 67 +++++++++++++++++++++++++++++++ test/functional/interface_rest.py | 21 ++++++++++ 3 files changed, 94 insertions(+) diff --git a/doc/REST-interface.md b/doc/REST-interface.md index 6664bc2a3a..728013fcf2 100644 --- a/doc/REST-interface.md +++ b/doc/REST-interface.md @@ -144,6 +144,12 @@ Refer to the `getrawmempool` RPC help for details. Defaults to setting *Query parameters for `verbose` and `mempool_sequence` available in 25.0 and up.* +#### Fees +`GET /rest/fee//.json` + +Returns fee and blocknumber where estimation was found. `` should be one of ``. +`` is the desired confirmation time (in block height). + Risks ------------- Running a web browser on the same node with a REST enabled bitcoind can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `