Skip to main content
GET
/
v1
/
chains
/
{chainAlias}
/
blocks
/
{blockIdentifier}
Get a block by chain and block number 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>"
        }
      ],
      "evmSpecific": {
        "status": 123,
        "nonce": 123,
        "gasLimit": 123,
        "gasUsed": 123,
        "gasPrice": "<string>",
        "data": "<string>",
        "effectiveGasPrice": "<string>",
        "maxFeePerGas": "<string>",
        "maxPriorityFeePerGas": "<string>",
        "cumulativeGasUsed": "<string>",
        "transactionType": "<string>",
        "contractAddress": "<string>"
      },
      "meta": {
        "syncedAt": {
          "0x1": 19800000
        }
      }
    }
  ],
  "evmSpecific": {
    "baseFeePerGas": "<string>",
    "difficulty": "<string>",
    "extraData": "<string>",
    "gasLimit": "<string>",
    "gasUsed": "<string>",
    "logsBloom": "<string>",
    "miner": "<string>",
    "nonce": "<string>",
    "mixHash": "<string>",
    "receiptsRoot": "<string>",
    "sha3Uncles": "<string>",
    "stateRoot": "<string>",
    "totalDifficulty": "<string>",
    "transactionsRoot": "<string>",
    "uncles": "<string>",
    "withdrawalsRoot": "<string>"
  },
  "meta": {
    "syncedAt": {
      "0x1": 19800000
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.moralis.com/llms.txt

Use this file to discover all available pages before exploring further.

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

The block number (integer) or block hash (hex string) to retrieve. All-digit values are interpreted as block heights. Any other value is forwarded as a hash.

chainAlias
enum<string>
required

The alias of the chain.

Available options:
0x89,
polygon,
bitcoin-mainnet,
bitcoin

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:
EVM,
Bitcoin,
Solana
txs
object[]
required

Full transaction list

evmSpecific
object
required

EVM-specific block fields

meta
object
required