⚡ Test Our Private Nodes of 40+ Blockchains just for $50!

coins coins coins coins
/

Nervos Network (CKB)

ckb
Nervos Network (CKB)

Method: POST get_current_epoch

dropdown

# get_current_epoch example for Nervos Network (CKB)

POST get_current_epoch

Returns the epoch with the highest number in the canonical chain. Pay attention that like blocks with the specific block number may change because of chain reorganization, This RPC may return different epochs which have the same epoch number.

Parameters

-

Request

curl --location --request POST 'https://ckb.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "get_current_epoch",
"params": [],
"id": "getblock.io"}'


Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "compact_target": "0x19129384",
        "length": "0x4c3",
        "number": "0x16ee",
        "start_number": "0x75a757"
    }
}