Skip to content


BLOCd daemon provides a HTTP 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 HTTP RPC API. Please visit the dedicated section on the BLOC-DEVELOPER website to view and test all the features available from the BLOCd Daemon HTTP 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 HTTP RPC API. We also have available the BLOCd JSON 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 height

curl http://localhost:2086/height
daemon.getHeight().then((result) => {
  // do something
}).catch((error) => {
  // do something
response := daemon.Height()

Expected Output:


height() returns the height of the daemon and the network

No Input.


Argument Description Format
height Current daemon height int
network_height Current Network height int
status Status of request string


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