List non-empty blocks
curl --request GET \
--url https://dev.backend.scan.biya.io/api/v1/blocksimport requests
url = "https://dev.backend.scan.biya.io/api/v1/blocks"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://dev.backend.scan.biya.io/api/v1/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://dev.backend.scan.biya.io/api/v1/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://dev.backend.scan.biya.io/api/v1/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://dev.backend.scan.biya.io/api/v1/blocks")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.backend.scan.biya.io/api/v1/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": [
{
"height": 123,
"blockId": "<string>",
"parentId": "<string>",
"blockTime": 123,
"appHash": "<string>",
"proposer": "<string>",
"knownTransactionCount": 123,
"actionCountComplete": true,
"decodeStatus": "<string>",
"sourceKind": "<string>",
"executionSucceeded": 123,
"executionFailed": 123,
"executionPartial": 123,
"executionUnknown": 123
}
],
"limit": 123,
"nextBefore": 123
}{
"error": "block not found"
}{
"error": "block not found"
}{
"error": "block not found"
}Stable
List non-empty blocks
Descending height list of stored non-empty blocks. before is an exclusive
height cursor. Empty blocks are omitted here; use DEX for empty-block pages.
GET
/
api
/
v1
/
blocks
List non-empty blocks
curl --request GET \
--url https://dev.backend.scan.biya.io/api/v1/blocksimport requests
url = "https://dev.backend.scan.biya.io/api/v1/blocks"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://dev.backend.scan.biya.io/api/v1/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://dev.backend.scan.biya.io/api/v1/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://dev.backend.scan.biya.io/api/v1/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://dev.backend.scan.biya.io/api/v1/blocks")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.backend.scan.biya.io/api/v1/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": [
{
"height": 123,
"blockId": "<string>",
"parentId": "<string>",
"blockTime": 123,
"appHash": "<string>",
"proposer": "<string>",
"knownTransactionCount": 123,
"actionCountComplete": true,
"decodeStatus": "<string>",
"sourceKind": "<string>",
"executionSucceeded": 123,
"executionFailed": 123,
"executionPartial": 123,
"executionUnknown": 123
}
],
"limit": 123,
"nextBefore": 123
}{
"error": "block not found"
}{
"error": "block not found"
}{
"error": "block not found"
}Query Parameters
Default 20, maximum 200.
Required range:
1 <= x <= 200Exclusive height cursor. Omit for the latest page.
Required range:
x >= 0