Get latest blocks
curl --request GET \
--url https://api.minaexplorer.com/blocksimport requests
url = "https://api.minaexplorer.com/blocks"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.minaexplorer.com/blocks', 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.minaexplorer.com/blocks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.minaexplorer.com/blocks"
req, _ := http.NewRequest("GET", url, nil)
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.minaexplorer.com/blocks")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minaexplorer.com/blocks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"blocks": [
{
"blockHeight": 0,
"canonical": true,
"creator": "string",
"creatorAccount": {
"publicKey": "string"
},
"dateTime": "string",
"protocolState": {
"blockchainState": {
"date": 0,
"snarkedLedgerHash": "string",
"stagedLedgerHash": "string",
"utcDate": 0
},
"consensusState": {
"blockHeight": 0,
"blockchainLength": 0,
"epoch": 0,
"epochCount": 0,
"hasAncestorInSameCheckpointWindow": true,
"lastVrfOutput": "string",
"minWindowDensity": 0,
"nextEpochData": {
"epochLength": 0,
"ledger": {
"hash": "string",
"totalCurrency": 0
},
"lockCheckpoint": "string",
"seed": "string",
"startCheckpoint": "string"
},
"slot": 0,
"slotSinceGenesis": 0,
"stakingEpochData": {
"epochLength": 0,
"ledger": {
"hash": "string",
"totalCurrency": 0
},
"lockCheckpoint": "string",
"seed": "string",
"startCheckpoint": "string"
},
"totalCurrency": 0
},
"previousStateHash": "string"
},
"receivedTime": "string",
"snarkJobs": [
{
"blockHeight": 0,
"blockStateHash": "string",
"dateTime": "string",
"fee": 0,
"prover": "string",
"workIds": [
{}
]
}
],
"stateHash": "string",
"stateHashField": "string",
"transactions": {
"coinbase": 0,
"coinbaseReceiverAccount": {
"publicKey": "string"
},
"feeTransfer": [
{
"fee": 0,
"recipient": "string"
}
],
"userCommands": [
{
"amount": 0,
"blockHeight": 0,
"blockStateHash": "string",
"dateTime": "string",
"fee": 0,
"feePayer": {
"publicKey": "string",
"token": 0
},
"feeToken": 0,
"from": "string",
"fromAccount": {
"publicKey": "string",
"token": 0
},
"hash": "string",
"id": "string",
"isDelegation": true,
"kind": "string",
"memo": "string",
"nonce": 0,
"receiver": {
"publicKey": "string"
},
"source": {
"publicKey": "string"
},
"to": "string",
"toAccount": {
"publicKey": "string",
"token": 0
},
"token": 0
}
]
},
"winnerAccount": {
"publicKey": "string"
}
}
]
}blocks
Get latest blocks
Get the latest blocks on the canonical chain. The default options return the latest block, but will return up to a maximum of 10 blocks. For full block data use the GraphQL API.
GET
/
blocks
Get latest blocks
curl --request GET \
--url https://api.minaexplorer.com/blocksimport requests
url = "https://api.minaexplorer.com/blocks"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.minaexplorer.com/blocks', 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.minaexplorer.com/blocks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.minaexplorer.com/blocks"
req, _ := http.NewRequest("GET", url, nil)
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.minaexplorer.com/blocks")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minaexplorer.com/blocks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"blocks": [
{
"blockHeight": 0,
"canonical": true,
"creator": "string",
"creatorAccount": {
"publicKey": "string"
},
"dateTime": "string",
"protocolState": {
"blockchainState": {
"date": 0,
"snarkedLedgerHash": "string",
"stagedLedgerHash": "string",
"utcDate": 0
},
"consensusState": {
"blockHeight": 0,
"blockchainLength": 0,
"epoch": 0,
"epochCount": 0,
"hasAncestorInSameCheckpointWindow": true,
"lastVrfOutput": "string",
"minWindowDensity": 0,
"nextEpochData": {
"epochLength": 0,
"ledger": {
"hash": "string",
"totalCurrency": 0
},
"lockCheckpoint": "string",
"seed": "string",
"startCheckpoint": "string"
},
"slot": 0,
"slotSinceGenesis": 0,
"stakingEpochData": {
"epochLength": 0,
"ledger": {
"hash": "string",
"totalCurrency": 0
},
"lockCheckpoint": "string",
"seed": "string",
"startCheckpoint": "string"
},
"totalCurrency": 0
},
"previousStateHash": "string"
},
"receivedTime": "string",
"snarkJobs": [
{
"blockHeight": 0,
"blockStateHash": "string",
"dateTime": "string",
"fee": 0,
"prover": "string",
"workIds": [
{}
]
}
],
"stateHash": "string",
"stateHashField": "string",
"transactions": {
"coinbase": 0,
"coinbaseReceiverAccount": {
"publicKey": "string"
},
"feeTransfer": [
{
"fee": 0,
"recipient": "string"
}
],
"userCommands": [
{
"amount": 0,
"blockHeight": 0,
"blockStateHash": "string",
"dateTime": "string",
"fee": 0,
"feePayer": {
"publicKey": "string",
"token": 0
},
"feeToken": 0,
"from": "string",
"fromAccount": {
"publicKey": "string",
"token": 0
},
"hash": "string",
"id": "string",
"isDelegation": true,
"kind": "string",
"memo": "string",
"nonce": 0,
"receiver": {
"publicKey": "string"
},
"source": {
"publicKey": "string"
},
"to": "string",
"toAccount": {
"publicKey": "string",
"token": 0
},
"token": 0
}
]
},
"winnerAccount": {
"publicKey": "string"
}
}
]
}⌘I