Skip to main content

REST API Quick Start

See below how you can start fetching data from the Mirror Nodes through our Service REST API.


You will need:

  • Arkhia's Service URL
  • Arkhia's API Key

Both of these can be retrieved from the Arkhia Dashboard after you Create a Project.

Don't have an account yet with Arkhia? Signup.

Basic Rest calls

    // Make sure you have Axios ( installedconst axios = require('axios');// These 2 variables are taken from your Arkhia account. Sign up @ ( baseUrl = `<ARKHIA_REST_API_URL_HERE>`;const headerKey = `<ARKHIA_API_KEY_HERE>`;// header config to work with Arkhiaconst config = {  method: 'get',  url: baseUrl,  headers: {    'x-api-key': headerKey  }};// Replace with the data you need to access from the mirror nodeconst standardApiRequests = {  transactions: `transactions`,  contracts: `contracts`,  tokens: `tokens`,  accounts: `accounts`,  balances: `balances`,  blocks: `blocks`,  schedules: `schedules`,  tokens: `tokens`,};const getMirrorNodeRestData = async (apiRequest) => {  config.url = `${baseUrl}/${apiRequest}`;  await axios(config)    .then(function (response) {      if (! {        console.error(`Something went wrong`);        return;      };`Retrieved ${[apiRequest].length} results`);    })    .catch(function (error) {      console.log(error);  });}getMirrorNodeRestData(standardApiRequests.tokens);process.on('uncaughtException', (error) => {  console.log(error)});process.on('unhandledRejection', (error) => {  console.log(error)});