Nfts
A set of queries related to NFTS to get your started
Get NFTS By TokenId
- 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 } };getNftsByTokenId = async (nftId) => { try { const nftsUrl = `${restApiUrl}/tokens/${nftId}/nfts`; const response = await axios.get(nftsUrl, body); return response; } catch(e) { console.error(e); }}
Get NFTs associated to an Account 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 } };// Get nfts for an account infogetNftsByAccountId= async (accountId) => { try { const nftsUrl = `${restApiUrl}/accounts/${accountId}/nfts`; const response = await axios.get(nftsUrl, body); return response; } catch(e) { console.error(e); }}
Get Specific Minted NFT info
- 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 } };// Get nfts for an account infogetNftTransactionHistoryById= async (nftId, serialNumber) => { try { const nftsInfo = `${restApiUrl}/tokens/${nftId}/nfts/${serialNumber}/transactions`; const response = await axios.get(nftsInfo, body); return response; } catch(e) { console.error(e); }}