I saw there are stats available to predict what fee to set for a transaction before submitting it to the network:
I feel like this information could help developers to avoid the annoying 504 Timeout error.
But honestly the amount of information delivered by the fee-stats query and what can be done with it is quite mysterious for me.
Can anyone explain, in practice, with an example, or simply a js source code, how to predict the fee of a transaction with the fee-stats?
Thanks in advance.