---
title: "One transaction"
method: GET
path: "/transaction/{network}/{hash}"
tags: ["Transactions"]
---

# One transaction

`GET /transaction/{network}/{hash}`

## Request

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

Confirmations, size, fee, and every input and output.

## Path parameters

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

## Query parameters

- `currency` 'AUD' | 'BRL' | 'CAD' | 'CHF' | 'CNY' | 'CZK' | 'DKK' | 'EUR' | 'GBP' | 'HKD' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JPY' | 'KRW' | 'MXN' | 'MYR' | 'NOK' | 'NZD' | 'PHP' | 'PLN' | 'RON' | 'SEK' | 'SGD' | 'THB' | 'TRY' | 'USD' | 'ZAR'

## Response `200`

Success.

- object
  - `status` 'success', required
  - `data` Transaction, required
    - `hash` string, required
    - `confirmations` integer, required: 0 while in the mempool.
    - `size` integer, required
    - `vsize` integer, required
    - `weight` integer, required
    - `version` integer, required
    - `locktime` integer, required
    - `block_hash` string, nullable, required
    - `block_height` integer, nullable, required
    - `time` integer, required
    - `inputs_n` integer, required
    - `outputs_n` integer, required
    - `inputs_value` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
    - `outputs_value` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
    - `fee` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
    - `price` Price, required: Price per coin, 8 decimals: in US dollars, or in the currency asked for. Always 0.00000000 on testnets.
      - `value` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
      - `currency` string, required: USD, or the currency asked for.
    - `facts` object: Only for a bridge's or a protocol's transaction: the name of its bridge (sBTC, Liquid, …) or protocol (babylon, counterparty, …).
      - `bridge` string
      - `protocol` string
    - `kind` 'payment' | 'batch_payout' | 'consolidation' | 'coinjoin' | 'inscription' | 'data' | 'lightning_close' | 'fee_bumped' | 'mweb_peg_in' | 'large_script' | 'transparent' | 'shielding' | 'deshielding' | 'shielded' | 'rune' | 'bridge' | 'token' | 'staking' | 'anchoring' | 'other' | 'null', nullable, required: What kind of transaction it is (inscription, rune, …), named as in a block's kinds (BlockKinds says what each is); null when not classified.
    - `heuristic` boolean, nullable, required: true when the kind is a guess (a CoinJoin, a cooperative Lightning close, a child paying its parent's fee); null with no kind.
    - `inputs` TransactionInput[], required
      - `index` integer, required
      - `value` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
      - `address` string, nullable, required: Null for a coinbase or a script without an address.
      - `scriptSig` Script, required
        - `hex` string, required
        - `asm` string, required
      - `witness` string[], required: Witness items, hex.
      - `previous_output` Outpoint, required
        - `hash` string, required: Transaction ID.
        - `index` integer, required
      - `sequence` integer: The input's nSequence: 4294967295 is final; below 4294967294 signals replace-by-fee where the network allows it, and it can set a relative timelock (BIP 68).
      - `mweb` 'pool' | 'pegin': Litecoin only: pool when it spends the MWEB pool, pegin when it spends a peg-in. Absent otherwise.
    - `outputs` TransactionOutput[], required
      - `index` integer, required
      - `value` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
      - `address` string, nullable, required: "op_return" for an OP_RETURN (nulldata) output, as v3 always said; null for other nonstandard scripts.
      - `type` string, required: pubkeyhash, scripthash, witness_v0_keyhash, witness_v0_scripthash, witness_v1_taproot, nulldata, …
      - `script` Script, required
        - `hex` string, required
        - `asm` string, required
      - `spent` Outpoint, required
        - `hash` string, required: Transaction ID.
        - `index` integer, required
      - `is_change` boolean, nullable, required: true when it pays one of the transaction's own input addresses; otherwise null (never false).
      - `mweb` 'pegin' | 'pool' | 'pegout': Litecoin only: pegin (moves coins into MWEB), pool (the MWEB pool, carried to the next block) or pegout (coins leaving MWEB). Absent otherwise.
    - `mweb` 'hogex' | 'pegin': Litecoin only: hogex for each block's MWEB transaction (its first output is the pool), pegin when it moves coins into MWEB. Absent otherwise.
    - `shielded` object: Zcash only: the value each shielded pool released into the transparent side (positive) or took from it (negative). Shielded inputs and outputs themselves are private: inputs and outputs list the transparent side only, and fee already accounts for this.
      - `sprout` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
      - `sapling` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
      - `orchard` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
      - `ironwood` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
      - `net` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.

## Other responses

- `400`: A bad parameter or body; the message says which.
- `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 an argument the network doesn't know.
- `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)
