You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GET /tx/:txid/outspend/:vout returns 200 status for transactions which do not exist #266
returns 200 with the payload above but the transaction b779bc24f17f0cea8dc556d4d1301642986517bfbbc631eab8a6454fca1202bb does not exist.
That contradicts with the GET /tx/:txid endpoint which returns a 404 for non existent txids. Following the example above https://blockstream.info/api/tx/b779bc24f17f0cea8dc556d4d1301642986517bfbbc631eab8a6454fca1202bb returns 404:
Transaction not found
The response of GET /tx/:txid/outspend/:vout is non consistent when querying inexsistent utxos.
Expected behavior
I would expect GET /tx/:txid/outspend/:vout to return a 404 for utxos which do not exist or have been dropped.
@dannybabbev I opened #269 for this. With it, outspend/:vout returns 404 when the txid doesn't exist or the vout is past the last output, same as GET /tx/:txid. Real unspent outputs (confirmed or in the mempool) still return 200 {"spent":false}.
One caveat: in light mode a confirmed tx's OP_RETURN and an out-of-range vout can't be told apart without asking bitcoind, so that edge case still returns 200 there.
If you still have the client that hit this, could you check that a 404 is what it needs? A real user saying so helps the maintainers decide on the response change.
Activity
Nicky980 commentedon Jul 18, 2025
or 500 status. Do you still see this?
nyeinmaung-mm commentedon Jul 24, 2026
Transaction not found
nyeinmaung-mm commentedon Jul 24, 2026
https://blockstream.info/api/tx/b779bc24f17f0cea8dc556d4d1301642986517bfbbc631eab8a6454fca1202bb/outspend/0
nyeinmaung-mm commentedon Jul 24, 2026
{
"spent": false
}
theluckystrike commentedon Nov 15, 2026
@dannybabbev I opened #269 for this. With it,
outspend/:voutreturns 404 when the txid doesn't exist or the vout is past the last output, same asGET /tx/:txid. Real unspent outputs (confirmed or in the mempool) still return 200{"spent":false}.One caveat: in light mode a confirmed tx's OP_RETURN and an out-of-range vout can't be told apart without asking bitcoind, so that edge case still returns 200 there.
If you still have the client that hit this, could you check that a 404 is what it needs? A real user saying so helps the maintainers decide on the response change.