Get Block Height

Retrieve the current height of the Bitcoin blockchain

Code samples


const headers = {
  'Accept':'application/json'
};

fetch('/bitcoin/current-height',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /bitcoin/current-height

Example responses

200 Response

{
  "code": 0,
  "message": "string",
  "data": {
    "height": 0
  }
}

Responses

Status
Meaning
Description
Schema

200

none

Inline

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

» code

integer(int)

false

none

Error code

» message

string(string)

false

none

Error message

» data

object

false

none

Result data

»» height

integer(int)

false

none

The current height of the Bitcoin blockchain

Last updated