API Documentation

Learn how to get started with the Nodecharts REST API

TheREST API of provides insights into the state of the Bitcoin blockchain and its aggregated, properly analyzed, curated, and structured information.

API queries are made through GET requests, returning data available for immediate consumption in JSON format.

The families endpoint lists all metrics grouped by families, including their name, endpoint, and description.

All the metrics available in the chart list of the Studio are accessible through the API.

On My Account – API page, you can obtain this resource, which you can use in your API requests by appending it to the URL. In our documentation, it is represented as{userhash}

In the endpoint{endpoint}/{userhash}, you can query the required parameters for each metric.

You can get the values of {endpoint} and {userhash} here and here.

Nodecharts will return a JSON response with the attributes of name, description, the family to which the metric belongs, the {endpoint} in which to request it and the metric’s parameter attribute.

The “params” attribute indicates the maximum (max) and minimum (min) values that each parameter can take, and whether they are required.

The parameters for requesting a metric are as follows:

  • “f”: From. Required. Integer. Initial Unixtime of the search.
  • “t”: To. Not required. Integer. Final Unix time of the search. If not configured, the system will return data up to the present.
  • “i”: Interval. Required. String. Resolution or data range. It can take the following values:
    • “Block”. Interval in blocks.
    • “Hour”. Interval in hours.
    • “Day”. Interval in days.

If these values are not set correctly, the query will return an errorHTTP/1.1 400 Bad Request.

Example of a request for information on the configuration of a metric:

To make a request to a metric, consult the address{endpoint}/{userhash}?{list_of_params}

Remember that the list of endpoints to get your {endpoint} can be found here.
To find out how to complete the {lista_de_params} of each metric, you can find its configuration in the following address{endpoint}/{userhash}
Remember to complete the {endpoint} and {userhash} parameters before making this request

All metrics respond with the same JSON array structure that you can immediately consume. These are its parameters:

  • “t”: Integer. Unix time of the data. In block resolution it indicates the time at which it was mined. In day and time resolutions it indicates the closing of the interval.
  • “v”: Metric value.
  • “usd”: Price in $USD at which the requested interval was quoted.
Each subscription has a maximum number of requests per minute, called the requests limit. This quota is consumed (decremented) equally with requests to the REST API or by querying graphs in the Studio. Combined graphs may involve multiple simultaneous requests.

The request quota is reset every 60 seconds to the maximum available according to the contracted subscription.

Not all requests involve quota consumption, as explained here.

If the maximum requests per minute are exceeded, the service will provide a response HTTP/1.1. 429 Too Many Requests.

Each metric has a specific service constraint configuration. To know the scope of your subscription data from the API itself you can check in the endpoint{endpoint}/{userhash} the parameter “memberships”. Compare it with the subscription id that you can find in your My Account page.

Values of the “memberships” attribute:

  • membership”: Integer. Subscription identifier to which each restriction setting applies.
  • offsets”: Maximum number of seconds of displacement, according to subscription, backward in time. The starting point is the last block computed by the system, which corresponds to the last state of the blockchain.
    Thus, a value of, for example, 259200 will return that number of seconds (72 hours) in data backwards in the blockchain since the last block the system computed.
    The value -1 corresponds to unlimited.
    This attribute is divided into the following:
    • b-offset-block”: Maximum displacement in blocks.
    • b-offset-hour”: Maximum offset in hours.
    • b-offset-day”: Maximum offset in days.
At the endpoint you can check the status of the system. This resource returns the product version. We are actively working on it, so the version number will change frequently.