Tokens
A set of queries related to tokens to get your started
Get Token By Id
- Node Js
const axios = require('axios');const apiKey = `<YOUR_ARKHIA_API_KEY>`;const restApiUrl = `<YOUR_ARKHIA_REST_URL>`;const body = { headers: { "x-api-key": apiKey } };getTokens = async () => { try { const tokensUrl = `${restApiUrl}/tokens`; const response = await axios.get(tokensUrl, body); return response; } catch(e) { console.error(e); }}
Get Last Tokens
- Node Js
const axios = require('axios');const apiKey = `<YOUR_ARKHIA_API_KEY>`;const restApiUrl = `<YOUR_ARKHIA_REST_URL>`;const body = { headers: { "x-api-key": apiKey } };// Your token should have a specific ID after its being createdgetTokenById = async (tokenId) => { try { const tokenUrl = `${restApiUrl}/tokens/${tokenId}`; const response = await axios.get(tokenUrl, body); return response; } catch(e) { console.error(e); }}