Skip to content

Block Information

GET /v2/blocks/{round}

Get the block for the given round.

Properties

NameTypeDescription
round*stringThe round from which to fetch block information.
format"json" | "msgpack"Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON.

* indicates required property

Packages

Node.js

Install

Terminal window
npm install algosdk --save

Usage

import { Algodv2 } from "algosdk";
const data = {round: 1}
const client = new Algodv2( "", "https://testnet-api.algonode.cloud", 443 );
const result = await client.block(data.round).do();

React

Install

Terminal window
npm install @awesome-algorand/react-query @txnlab/use-wallet-react @tanstack/react-query algosdk --save

Usage

import { useBlockInformation } from '@awesome-algorand/react-query';
export function BlockInformationViewer() {
const data = {round: 1}
const query = useBlockInformation(data);
}

Svelte [WIP]

Coming Soon!

Solid [WIP]

Coming Soon!

Vue [WIP]

Coming Soon!

Angular [WIP]

Coming Soon!