For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

Nervos CKB


Nervos CKB API is available on Web3 API platform.

Nervos CKB (Common Knowledge Base) is the Layer 1, proof-of-work blockchain of the Nervos ecosystem. As the foundation of the ecosystem, it provides trust for all the layers built on top of it. CKB uses an improved Nakamoto consensus (NC-Max) and a generalized UTXO model — the Cell model — designed to maximize decentralization while remaining minimal, flexible, and secure. Its primary objective is to reliably preserve any data and assets stored therein.

warning

The Nervos EVM / Polyjuice (Godwoken) Layer 2 endpoint (rpc.ankr.com/nervos) has been deprecated and removed. Nervos officially sunset the Godwoken network starting June 2025 (a strategic shift toward UTXO-native protocols such as RGB++), so the network is no longer operational upstream. See the official Godwoken & Force Bridge sunset announcement. Only the native Nervos CKB (Layer 1) endpoint documented below is available.

In order for your Web3 application to interact with Nervos CKB — either by reading blockchain data or sending transactions to the network — it must connect to a CKB node. Developers interact with the blockchain using the methods provided by the API.

The API interaction follows the JSON-RPC which is a stateless, light-weight remote procedure call (RPC) protocol. It uses JSON (RFC 4627) as data format. CKB exposes its JSON-RPC over HTTPS and WSS.

Endpoint format:

https://rpc.ankr.com/nervos_ckb/YOUR_ANKR_API_KEY

Official quick links: Website, CKB Docs, JSON-RPC reference, GitHub


Methods supported


  • get_tip_block_number — returns the highest block number in the canonical chain.
  • get_tip_header — returns the header with the highest block number in the canonical chain.
  • get_current_epoch — returns the epoch with the highest number in the canonical chain.
  • get_block_by_number — returns the block in the canonical chain with the specified block number.
  • get_block — returns the information about a block by hash.
  • get_header — returns the information about a block header by hash.
  • get_header_by_number — returns the block header in the canonical chain with the specified block number.
  • get_block_hash — returns the block hash of a block in the canonical chain by block number.
  • get_transaction — returns the information about a transaction by hash, including its status.
  • get_live_cell — returns the status of a cell, optionally with its data.
  • get_consensus — returns various consensus parameters.
  • get_fee_rate_statistics — returns the fee rate statistics of confirmed blocks.
  • get_blockchain_info — returns general information about the chain.
  • tx_pool_info — returns the transaction pool information.
  • send_transaction — submits a new transaction into the transaction pool.
  • test_tx_pool_accept — tests whether the transaction pool would accept a transaction.
tip

CKB encodes integers as 0x-prefixed hexadecimal strings (e.g. block number 0x12a6ad1). Block hashes and other byte fields are 0x-prefixed hex.

warning

Node administration, mining and network-control methods are not exposed on the shared endpoint — e.g. local_node_info, get_peers, get_banned_addresses, set_ban, sync_state, add_node, remove_node, clear_tx_pool, truncate, generate_block, miner methods (get_block_template, submit_block) and debug_*. For dedicated access, contact Sales (sales@ankr.com) about the Enterprise plan.


Methods

get, tx, send, test