Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Kadena block API

These endpoints return whole blocks, headers and payloads, from the chaindatabase.Generally, blocks are returned in ascending order and include orphanedblocks.For only querying blocks that are included in the winning branch of thechain the `branch` endpoints can be used, which return blocks in descendingorder starting from the leafs of branches of the block chain.Blocks are returned in only one format, with block headers and payloads inJSON encoding.

Kadena block API is one of 16 APIs that Kadena publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include block. The published artifact set on APIs.io includes an OpenAPI specification and an API reference.

This API exposes 2 operations across 2 paths, and defines 16 schemas. It is described by OpenAPI 3.0.0, at version 0.0.

Requests are made against 5 base URLs: https://api.chainweb.com/chainweb/{apiVersion}/mainnet01, https://api.testnet.chainweb.com/chainweb/{apiVersion}/testnet04, {schema}://{domain}:{port}/chainweb/{apiVersion}/{chainwebVersion}, https://{location}.chainweb.com/chainweb/{apiVersion}/mainnet01, https://{location}.testnet.chainweb.com/chainweb/{apiVersion}/testnet04.

2 operations 2 paths 16 schemas 1 GET1 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.0
API Version
0.0
Base URL
https://api.chainweb.com/chainweb/0.0/mainnet01
Resource Areas
1

Paths & Operations 2

Across 2 paths, the API surfaces 2 operations — 1 GET, 1 POST. Each is listed below with its method, path, parameters, and response codes.

block 2

These endpoints return whole blocks, headers and payloads, from the chain database. Generally, blocks are returned in ascending order and include orphaned blocks. For only queryin…

GET
/chain/{chain}/block
Get Block
5 params → 200404
POST
/chain/{chain}/block/branch
Get Block Branches
5 params body → 200400406404

Schemas 16

The contract defines 16 schemas that model the data the API accepts and returns. The most detailed are blockHeader (13 properties), payloadWithOutputs (6 properties), page (3 properties), block (2 properties). Each schema is shown below with its type and property counts.

blockHash
Base64Url (without padding) encoded block hash
posixTimestampMicro
integer
Microseconds since POSIX epoch
blockHeight
integer
The height of a block is the number of its predecessors in the block chain
payloadWithOutputs
object
Payload with outputs of a Block including the Merkle roots for transactions and transaction outputs
6 properties 6 required
blockWeight
string
The POW weight of a block is the sum of the difficulties of the block and of all of its ancestors. The difficulty of a block is the maximum difficulty divided…
payloadHash
Base64Url (without padding) encoded block payload hash
block
object
A block header and payload
2 properties 2 required
hostAddress
string
Host address containing IPv4 and port
blockHeader
object
JSON Encoded Block Header
13 properties 13 required
page
object
Page of a collection of items
3 properties 3 required
chainwebVersion
The version of the Chainweb network
nonce
string
PoW nonce of the block. This is computed by the miner such that the block hash is smaller than the target.
sha256Hash
string
Base64Url (without padding) encoded SHA256 hash
target
string
The PoW target of a block represented as the base64Url (without padding) 256 bit little endian encoding of the numerical value.
chainId
integer
A Chainweb chain ID. In Kadena Chainweb chains are named by numbers starting form 0. Valid values depend on the current graph at the respective block height of…
posixTimestamp
integer
Seconds since POSIX epoch

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

kadena-block-api-openapi.yml Raw ↑

Other APIs Kadena publishes across the network.

Kadena blockhash API
Kadena config API
Kadena cut API
Kadena endpoint-listen API
Kadena endpoint-local API
Kadena endpoint-poll API
Kadena endpoint-private API
Kadena endpoint-send API
Kadena endpoint-spv API
Kadena header API
Kadena mempool API
Kadena mining API