Skip to main content

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.

Specify a User-Agent

To access the helium api via script you will need to specify a valid User-Agent HTTP header field identifying your agent, all requests made without a User-Agent header will result in an error 429 Slow down gun powder!.

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.

In order to 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. A cursor will be returned with each response until the last page is reached, at which point no cursor is returned.

info

In order to improve caching the API may return an empty data array and a cursor. Use the cursor to request more data.

Transaction Units

All API endpoints which return a transaction value (i.e. fee, amount, etc) are represented in the base unit bones.

The conversion rate is 100,000,000 bone per HNT.