Skip to content

GET /tx/:txid/outspend/:vout returns 200 status for transactions which do not exist #266

Open

Description

@dannybabbev

Problem

The response of GET /tx/:txid/outspend/:vout for a txid which does not exist is 200 with a payload

{
    "spent": false
}

which is identical to valid utxos which have not been spent.

for example:

https://blockstream.info/api/tx/b779bc24f17f0cea8dc556d4d1301642986517bfbbc631eab8a6454fca1202bb/outspend/0

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.

Activity

  1. Nicky980 commented on Jul 18, 2025

    @Nicky980

    or 500 status. Do you still see this?

  2. nyeinmaung-mm commented on Jul 24, 2026

    @nyeinmaung-mm

    Transaction not found

  3. nyeinmaung-mm commented on Jul 24, 2026

    @nyeinmaung-mm
  4. nyeinmaung-mm commented on Jul 24, 2026

    @nyeinmaung-mm

    {
    "spent": false
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions