Transaction Unconfirmed, Pending, Dropped or Failed

When a transaction is successfully broadcasted, you will get a transaction hash. At this stage, the transaction entered the Mempool and remains "Pending", waiting for confirmation.

Confirming a transaction can take from seconds to minutes, to many hours. Factors such as the total network activity or congestion, hash rate, and transaction fees impact the time it takes for a transaction to get confirmed.

For example, the usual average confirmation time for a BTC transaction is about 10 minutes. However, if the Bitcoin network is congested, there may be a backlog of transactions in the Mempool awaiting verification. The same applies to any other network.

In most cases, your transactions will be confirmed. How long this takes depends on the chain network, based on how much fee was allocated and Mempool congestion.

Two things can happen to unconfirmed transactions in the Mempool:

  • The transaction is confirmed, eventually - a block is assigned.

  • The transaction is dropped.

πŸ“˜

Mempool: the "waiting room" for transactions that have not yet been validated by a miner and added to a next block on the blockchain.

Get transaction by hash

EVM (like Ethereum):

  • Unconfirmed transactions return an error
  • Dropped transactions return an error
  • Failed transaction returns successfully. However, the status = false

Example error - Unconfirmed or Dropped:

curl --location 'https://api.tatum.io/v3/ethereum/transaction/0xb491a90c665ab8a3bcebb42cbc30ded73bf40eae40d45a365895a33595d347dc' \
--header 'x-api-key: {API_KEY}'
//Response:
{
    "statusCode": 403,
    "errorCode": "eth.tx.not.found",
    "message": "Transaction 0xb491a90c665ab8a3bcebb42cbc30ded73bf40eae40d45a365895a33595d347dc not found. Possible not exists or is still pending.",
    "dashboardLog": "https://dashboard.tatum.io/logs?id=65###315a"
}

Example of a "Failed" transaction:

curl --location 'https://api.tatum.io/v3/polygon/transaction/0x1e755e53f435edb8e0d7b77009acd7e9895392383338db670ad5cf3f47707ac0' \
--header 'x-api-key: {API_KEY}'
//Response:
{
  "transactionHash": "0x1e755e53f435edb8e0d7b77009acd7e9895392383338db670ad5cf3f47707ac0",
  "blockHash": "0x0985bef90d3b689084208e0e46b5c5c974e20aa5c06b57705ed617c92c769e46",
  "blockNumber": 10234274,
  //Additional tx data
  "status": false, //Indicating that even though the tx was included in a block, it "failed. 
  "hash": "0x1e755e53f435edb8e0d7b77009acd7e9895392383338db670ad5cf3f47707ac0"
}

UTXO (like Bitcoin)

  • Unconfirmed: transactions return with the parameter "blocknumber": null
  • Dropped transactions return an error

Example of BTC transaction waiting in Mempool

curl --location 'https://api.tatum.io/v3/bitcoin/transaction/61749d00c59548b3b5c6f394a218a1c55b0f99020ca49cbec5c0a590c74ee89a' \
--header 'x-api-key: {API_KEY}'
//response:
{
    "blockNumber": null, //Since the transaction is unconfirmed, there can't be a "blockNumber"
    "fee": 4245,
    "hash": "61749d00c59548b3b5c6f394a218a1c55b0f99020ca49cbec5c0a590c74ee89a",
    "hex": "0200000000...

Example of BTC transaction dropped

curl --location 'https://api.tatum.io/v3/bitcoin/transaction/61749d00c59548b3c5c6f394a218a1c55b0f99020ca49cbec5c0a590c74ee89a' \
--header 'x-api-key: {API_KEY}'
//response:
{
    "statusCode": 403,
    "errorCode": "btc.tx.not.found",
    "message": "Transaction 61749d00c59548b3c5c6f394a218a1c55b0f99020ca49cbec5c0a590c74ee89a not found. Possible not exists or is still pending.",
    "dashboardLog": "https://dashboard.tatum.io/logs?id=65c75###22ae3d3"
}