Closed apotdevin closed 4 years ago
I'll take a look
I think it's just a matter of confusing commenting, the values returned are correct: what you set is what is returned
The comment says "parts per million" essentially - as in 1 mtok per 1 million mtok and 1 token per 1 million token, meaning the same thing
I see, so if I understood correctly, they are both in millitokens right?
I see, so if I understood correctly, they are both in millitokens right?
This is a ratio, not a millitoken or tokens - it's parts/million - it's like a percentage
Ok, I understand, so you are never setting msats or sats just the percentage. That explains my confusion, sorry, didn't understand the units in the docs
Yeah when ln-service was started there was very limited access to millitoken precision in the API, but now that they are more consistently added throughout the API I will shift more towards referencing millitokens over tokens
I've updated the descriptions to remove mention of tokens and replace it with millitokens, that is more accurately describing the fee rates.
I believe there is some unit mismatch in the fee rates from
getFeeRates
and the expected fee rate inupdateRoutingFees
.Units in docs:
getFeeRates
:fee_rate: <Fee Rate In Tokens Per Million Number>
updateRoutingFees
:[fee_rate]: <Fee Rate In Millitokens Per Million Number>
Example: Changing fees with
updateRoutingFees({lnd, fee_rate: 5000})
and then callinggetFeeRates({lnd})
givesfee_rate
of 5000sats instead of 5sats