Skip to content
This repository has been archived by the owner on Feb 12, 2021. It is now read-only.

Latest commit

 

History

History
42 lines (25 loc) · 1.68 KB

README.md

File metadata and controls

42 lines (25 loc) · 1.68 KB

Blockchain API

Endpoints

The Helium blockchain API serves up the blockchain from a database that is filled by a blockchain node that populates the database as blocks come in.

While anyone can run a node and a corresponding API, the Helium hosted version offers up the API through two endpoints.

  • https://api.helium.wtf — Beta, scalable endpoint for new features and tests. Currently connected to mainnet. This endpoint is used for feature development. Submitted transactions may get dropped.
  • https://api.helium.io — Stable, scalable production service. Connected to mainnet.

Routes

The API routes are grouped together in sub-pages of this page. Refer to the subpages for details.

Cursors

In order to return data quickly and reduce the load on the API, a cursor may be returned from an API request. The documentation for each route will indicate whether the result is paged with a cursor.

The request the next page of results add a cursor URL parameter to the URL that was used to make the first request.

For example:

export API_URL=https://api.helium.io
http get $(API_URL)/v1/blocks

will return a data array with zero or more block results and a cursor field. To request the next page:

http get $(API_URL)/v1/blocks?cursor=eyJiZWZvcmUiOjQzOTIwMX0

Which will return the next page of results and a next cursor for the following page.

{% hint style="warning" %} In order to improve caching the API may return an empty data array and a cursor. Use the cursor to request more data. {% endhint %}