Skip to content


BLOCd Daemon provides a JSON RPC API, used to receive informations from the blockchain allowing it to be controlled locally or remotely which makes it useful for integration with other software or in larger payment systems. Various commands are made available by the API described on this page.


This page is only a short guide how to get you started with the BLOCd Daemon JSON RPC API. Please visit the dedicated section on the BLOC-DEVELOPER website to view and test all the features available from the BLOCd Daemon JSON RPC API.


Currently we support the following official client bindings:

npm install bloc-rpc
composer require
go get

Getting Started

This section describes BLOCd Daemon integration process into your service with BLOCd JSON RPC API. We also have available the BLOCd HTTP RPC API if you need.

Make sure you have started BLOCd with the correct configuration to enable BLOCd JSON RPC API before using the following functions.

Interacting with the API

API endpoint example


Configuration and Installation

const BLOCd = require('bloc-rpc').BLOCd

const daemon = new BLOCd({
  host: '', // ip address or hostname of the BLOCd host
  port: 2086, // what port is the RPC server running on
  timeout: 2000, // request timeout
  ssl: false // whether we need to connect using SSL/TLS

$config = [
    'rpcHost' => 'http://localhost',
    'rpcPort' => 2086,

$blocd = new BLOCd($config);
import (
    trpc ""

rpcHost := "localhost"
rpcPort := 2086

daemon := trpc.BLOCd{
    URL: rpcHost,
    Port: rpcPort}

Example getblockcount

curl -d '{"jsonrpc":"2.0", "method":"getblockcount", "params":{}}' http://localhost:2086/json_rpc
daemon.getBlockCount().then((blockCount) => {
  // do something
}).catch((error) => {
  // do something
$response = $blocd->getBlockCount();
echo $response;
response := daemon.GetBlockCount()

Expected Output


getblockcount() method returns the current chain height.

No Input.


Argument Description Format
count Current chain height int
status Status of request string


Make sure you check the complete features of BLOCd JSON RPC API from the dedicated BLOC-DEVELOPER website.