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 header API

These endpoints return block headers from the chain database.Similar to the block endpoints, block headers are generally returned inascending order and include headers of orphaned blocks.For only querying block headers that are included in the winning branch ofthe chain the `branch` endpoints can be used, which return block headers indescending order starting from the leafs of branches of the block chain.Block headers are returned in three different formats specified in the `accept` header of the request:* `application/json`, returns block headers in base64Url (without padding) encoded binary.* `application/json;blockheader-encoding=object`, returns block headers in JSON encoding.* `application/octet-stream`, when supported by the endpoint, returns block headers as binary.

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

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

This API exposes 3 operations across 3 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.

3 operations 3 paths 16 schemas 2 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 3

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

header 3

These endpoints return block headers from the chain database. Similar to the block endpoints, block headers are generally returned in ascending order and include headers of orphan…

GET
/chain/{chain}/header
Get Block Headers
5 params → 200404
GET
/chain/{chain}/header/{blockHash}
Get Block Header by Hash
2 params → 200404406
POST
/chain/{chain}/header/branch
Get Block Header 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), page (3 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
base64Header
string
Base64Url (without padding) encoded binary block header
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
binaryHeader
string
Binary representation of a block header
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.
target
string
The PoW target of a block represented as the base64Url (without padding) 256 bit little endian encoding of the numerical value.
sha256Hash
string
Base64Url (without padding) encoded SHA256 hash
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-header-api-openapi.yml Raw ↑

Other APIs Kadena publishes across the network.

Kadena block API
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 mempool API
Kadena mining API