Skip to main content
GET
/
v1
/
chains
/
{chainAlias}
/
blocks
/
{blockIdentifier}
Get a Bitcoin block by height or hash
curl --request GET \
  --url https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier} \
  --header 'X-Api-Key: <api-key>'
{
  "page": 123,
  "totalPages": 123,
  "itemsOnPage": 123,
  "hash": "<string>",
  "previousBlockHash": "<string>",
  "height": 123,
  "size": 123,
  "time": 123,
  "txCount": 123,
  "txs": [
    {
      "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"
        }
      }
    }
  ],
  "bitcoinSpecific": {
    "bits": "<string>",
    "chainwork": "<string>",
    "difficulty": "<string>",
    "merkleRoot": "<string>",
    "miner": "<string>",
    "nonce": "<string>",
    "weight": "<string>",
    "witnessCommitment": "<string>"
  },
  "meta": {
    "syncedAt": {
      "bitcoin": "latest"
    }
  }
}
For Bitcoin, pass bitcoin (or bitcoin-mainnet) as chainAlias. The blockIdentifier accepts either a Bitcoin block height (all-digit values are treated as heights) or a block hash (any other value is forwarded as a hash).

Authorizations

X-Api-Key
string
header
required

Path Parameters

blockIdentifier
string
required

Bitcoin block identifier. Accepts either a block height (all-digit values) or a block hash.

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 transactions (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).

excludeFields
string

Fields to exclude from response (comma-separated: logs, internalTransactions, tokenTransfers, etc.).

Response

200 - application/json
page
number
required

Page number (always 1, no pagination)

totalPages
number
required

Total pages (always 1)

itemsOnPage
number
required

Number of transactions on this page (equals txCount)

hash
string
required

Block hash

previousBlockHash
string
required

Parent block hash

height
number
required

Block height (block number as integer)

size
number
required

Block size in bytes

time
number
required

Block timestamp as Unix seconds

txCount
number
required

Number of transactions

chainFamily
enum<string>
required

Chain family discriminator used to identify the response variant

Available options:
Bitcoin
txs
object[]
required

Full transaction list

bitcoinSpecific
object
required

Bitcoin-specific block fields

meta
object
required