Skip to main content
GET
/
v1
/
chains
/
{chainAlias}
/
transactions
/
{txHash}
Get a Bitcoin transaction by txid
curl --request GET \
  --url https://api.moralis.com/v1/chains/{chainAlias}/transactions/{txHash} \
  --header 'X-Api-Key: <api-key>'
{
  "txid": "<string>",
  "vin": [
    {
      "txid": "<string>",
      "vout": 123,
      "sequence": 123,
      "n": 123,
      "addresses": [
        "<string>"
      ],
      "isAddress": true,
      "value": "<string>",
      "hex": "<string>"
    }
  ],
  "vout": [
    {
      "n": 123,
      "value": "<string>",
      "addresses": [
        "<string>"
      ],
      "isAddress": true,
      "spent": true,
      "hex": "<string>"
    }
  ],
  "blockHash": "<string>",
  "blockHeight": 123,
  "blockTime": 123,
  "value": "<string>",
  "fees": "<string>",
  "tokenTransfers": [
    {
      "type": "<string>",
      "from": "<string>",
      "to": "<string>",
      "token": "<string>",
      "name": "<string>",
      "symbol": "<string>",
      "decimals": 123,
      "value": "<string>"
    }
  ],
  "bitcoinSpecific": {
    "version": 123,
    "locktime": 123,
    "weight": 123,
    "vsize": 123,
    "valueIn": "<string>",
    "hex": "<string>",
    "miscJson": "<string>"
  },
  "meta": {
    "syncedAt": {
      "bitcoin": "latest"
    }
  }
}
For Bitcoin, pass bitcoin (or bitcoin-mainnet) as chainAlias and the Bitcoin txid as txHash.

Authorizations

X-Api-Key
string
header
required

Path Parameters

txHash
string
required

Bitcoin transaction ID (txid).

chainAlias
enum<string>
required

Bitcoin chain alias. Pass bitcoin or bitcoin-mainnet.

Available options:
bitcoin,
bitcoin-mainnet

Query Parameters

enrich
boolean
default:false

Master switch for ABI decoding enrichment (method labels, decoded logs, decoded input). Defaults to false.

includeMethodLabel
boolean

Include method labels on the transaction (overrides enrich).

decodeInput
boolean

Decode transaction input data (overrides enrich).

decodeLogs
boolean

Decode log events (overrides enrich).

includedTopicZeros
string

Whitelist logs by topic0 (comma-separated hex values).

Response

200 - application/json
txid
string
required

Transaction hash

vin
object[]
required

Transaction inputs

vout
object[]
required

Transaction outputs

blockHash
string | null
required

Block hash (null for unconfirmed/mempool transactions)

blockHeight
number
required

Block height

blockTime
number
required

Block timestamp as Unix seconds

value
string
required

Value transferred

fees
string
required

Transaction fee

tokenTransfers
object[] | null
required

Token transfers

chainFamily
enum<string>
required

Chain family discriminator used to identify the response variant

Available options:
Bitcoin
bitcoinSpecific
object
required

Bitcoin-specific transaction fields

meta
object
required