---
title: "Whether a transaction is pending, mined, replaced or dropped"
method: GET
path: "/transaction_status/{network}/{hash}"
tags: ["Transactions"]
---

# Whether a transaction is pending, mined, replaced or dropped

`GET /transaction_status/{network}/{hash}`

## Request

- Base URL: `https://sochain.com/api/v3`
- URL: `https://sochain.com/api/v3/transaction_status/{network}/{hash}`
- Auth: one of:
  - none
  - API key in header `API-KEY`
  - API key in query parameter `api_key`

A transaction is replaced when another one spends one of its inputs (a fee bump, a double spend, or a transaction it spends from being replaced) and dropped when the mempool lets it go unconfirmed. SoChain remembers a transaction that left the mempool for about a day; after that, or for one SoChain never saw, the status is unknown.

## Path parameters

- `network` 'BTC' | 'LTC' | 'DOGE' | 'ZEC' | 'BTCTEST' | 'LTCTEST' | 'DOGETEST' | 'ZECTEST', required
- `hash` string, required

## Response `200`

Success.

- object
  - `status` 'success', required
  - `data` TransactionStatus, required
    - `network` 'BTC' | 'LTC' | 'DOGE' | 'ZEC' | 'BTCTEST' | 'LTCTEST' | 'DOGETEST' | 'ZECTEST', required
    - `hash` string, required: The transaction ID.
    - `status` 'pending' | 'mined' | 'replaced' | 'dropped' | 'expired' | 'unknown', required: pending: waiting in the mempool. mined: in a block. replaced: another transaction spends one of its inputs. dropped: it left the mempool unconfirmed. expired (Zcash): it passed its expiry height unmined. unknown: SoChain can't tell (it never saw it, or it left the mempool too long ago).
    - `block_height` integer, nullable, required: The block it's in, once mined.
    - `confirmations` integer, nullable, required: 0 while pending, 1 or more once mined; null otherwise.
    - `replaced_by` string, nullable, required: The transaction that now spends one of its inputs (the last one, after several quick replacements).
    - `replaced_by_status` unknown, required
    - `replaced_by_height` integer, nullable, required: The replacement's block, once mined.
    - `replaced_ancestor` string, nullable, required: Set when it was replaced because a transaction it spends from was: that transaction.
    - `removed_at` integer, nullable, required: When it left the mempool (Unix time).

## Other responses

- `401`: An invalid key, no key where one is needed (buckets, webhooks, /account_info), a locked account or expired plan, or both the month's requests and the keyless rate used up. Kept as 401, with this message, for v3 compatibility.
- `404`: Not found: an unknown network, or not a transaction ID. A well-formed hash always gets 200.
- `429`: Without a key, past the day's 2,500 lookups from this IP while SoChain is busy (Retry-After: 60), or past the day's most (Retry-After: seconds to 00:00 UTC). With or without one, too many requests in flight at once (Retry-After: 1, not counted).
- `503`: Briefly unavailable; retry with backoff. May carry Retry-After.

---

[API](https://skmtc.dev/sochain/apis/sochain-api.md) · [All operations](https://skmtc.dev/sochain/apis/sochain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sochain/apis/sochain-api/revisions/80682797b38f?raw)
