<p>You need to take a look at how <code>fee_estimates.dat</code> is written and interpreted. It is a binary file composed of:</p>
<pre><code>MIN_VERSION
CURRENT_VERSION
CURRENT_TIP
TIP_AT_LAST_START
TIP_AT_LAST_STOP
[ESTIMATES]
[STATS]
</code></pre>
<p>With <code>CURRENT</code> being &quot;when writing&quot;, i.e. when stopping <code>bitcoind</code>.</p>
<p><a href="https://github.com/bitcoin/bitcoin/blob/593f5e239f277e3fd917737122c2aed3c615430c/src/policy/fees.cpp#L864" rel="nofollow noreferrer">Here</a> is the method writing the file, and <a href="https://github.com/bitcoin/bitcoin/blob/593f5e239f277e3fd917737122c2aed3c615430c/src/policy/fees.cpp#L889" rel="nofollow noreferrer">here</a> is the method reading this file (at startup). I think the latter can help you to parse it.</p>

CC BY-SA 4.0
2020-01-04T15:20:17.923Z
2020-09-30T22:47:39.813Z
2020-09-30T22:47:39.813Z
Antoine Poinsot
<p>I would like to take a look inside <code>fee_estimates.dat</code> to understand a bit better how the RPC command <code>estimatesmartfee</code> works. However, when I open the file in a text editor, the content is not readable. </p>

<p>Is there a way to read the information inside <code>fee_estimates.dat</code>?</p>

<bitcoin-core><transaction-fees><fee-estimation>
How to convert fee_estimates.dat into a human-readable format?
Pedro
# How to convert fee_estimates.dat into a human-readable format?

(Asked by: username_0 on 2019-02-28)

I would like to take a look inside `fee_estimates.dat` to understand a bit better how the RPC command `estimatesmartfee` works. However, when I open the file in a text editor, the content is not readable.

Is there a way to read the information inside `fee_estimates.dat`?

**Tags:** bitcoin-core, transaction-fees, fee-estimation


---

## 1 answers

### Answer by username_1 on 2020-01-04. Score: 1

You need to take a look at how `fee_estimates.dat` is written and interpreted. It is a binary file composed of:

```
MIN_VERSION
CURRENT_VERSION
CURRENT_TIP
TIP_AT_LAST_START
TIP_AT_LAST_STOP
[ESTIMATES]
[STATS]

```

With `CURRENT` being "when writing", i.e. when stopping `bitcoind`.

[Here](https://github.com/bitcoin/bitcoin/blob/593f5e239f277e3fd917737122c2aed3c615430c/src/policy/fees.cpp#L864) is the method writing the file, and [here](https://github.com/bitcoin/bitcoin/blob/593f5e239f277e3fd917737122c2aed3c615430c/src/policy/fees.cpp#L889) is the method reading this file (at startup). I think the latter can help you to parse it.


---

