curl --request GET \
--url https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"page": 123,
"totalPages": 123,
"itemsOnPage": 123,
"hash": "<string>",
"previousBlockHash": "<string>",
"height": 123,
"size": 123,
"time": 123,
"txCount": 123,
"chainFamily": "Bitcoin",
"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>"
}
],
"chainFamily": "Bitcoin",
"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"
}
}
}Get Block
Returns full Bitcoin block data including transactions, inputs, outputs, and UTXO-level detail.
curl --request GET \
--url https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moralis.com/v1/chains/{chainAlias}/blocks/{blockIdentifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"page": 123,
"totalPages": 123,
"itemsOnPage": 123,
"hash": "<string>",
"previousBlockHash": "<string>",
"height": 123,
"size": 123,
"time": 123,
"txCount": 123,
"chainFamily": "Bitcoin",
"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>"
}
],
"chainFamily": "Bitcoin",
"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"
}
}
}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
Path Parameters
Bitcoin block identifier. Accepts either a block height (all-digit values) or a block hash.
Bitcoin chain alias. Pass bitcoin or bitcoin-mainnet.
bitcoin, bitcoin-mainnet Query Parameters
Master switch for ABI decoding enrichment (method labels, decoded logs, decoded input). Defaults to false.
Include method labels on transactions (overrides enrich).
Decode transaction input data (overrides enrich).
Decode log events (overrides enrich).
Whitelist logs by topic0 (comma-separated hex values).
Fields to exclude from response (comma-separated: logs, internalTransactions, tokenTransfers, etc.).
Response
Page number (always 1, no pagination)
Total pages (always 1)
Number of transactions on this page (equals txCount)
Block hash
Parent block hash
Block height (block number as integer)
Block size in bytes
Block timestamp as Unix seconds
Number of transactions
Chain family discriminator used to identify the response variant
Bitcoin Full transaction list
Show child attributes
Show child attributes
Bitcoin-specific block fields
Show child attributes
Show child attributes
Show child attributes
Show child attributes

