stacks-core
stacks-core copied to clipboard
Deprecate or remove (EDIT(jcnelson): or fix) the `/v2/fees/transfer` endpoint
Problem
Everyone should be using the /v2/fees/transaction
for fee estimation. Unfortunately, not only does the /v2/fees/transfer
endpoint still exist, it isn't even marked deprecated anywhere clearly (e.g. not in the openapi spec, not in this doc, not in the code )
This routinely confuses people, not least because looking at the endpoints alone (/v2/fees/transfer
vs /v2/fees/transaction
) it's impossible to tell the different without looking at the docs or code.
Desired solution
Deprecate or better yet, remove the outdated /v2/fees/transfer
endpoint.
How about, since people apparently use this endpoint, we instead fix /v2/fees/transfer
to do what it's supposed to do?
How about, since people apparently use this endpoint, we instead fix
/v2/fees/transfer
to do what it's supposed to do?
From being on the receiving end of a lot of questions / tech support requests around this, I'll just say one endpoint is better / less confusing than two.
If you're seeing people query this endpoint, then I think it's safe to assume that the questions / tech support requests aren't going to go away if we just disable it. They'll just ask why it broke.
The endpoint is indeed broken insofar as it returns incorrect data. However, it's straightforward to make it return correct data, since it can rely on the same machinery that /v2/fees/transaction
uses. Also, it's a lot less clunky than /v2/fees/transaction
if you're just sending a token-transfer -- it'll give you a scalar fee in response to a body-less GET request, as opposed to requiring you to serialize and POST your transaction to the node and then parse a JSON response.
I'll go ahead and fix it.
Fixed: https://github.com/stacks-network/stacks-core/pull/4754
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.