// Setup request parameters
const timestamp = Date.now().toString();
// For GET requests with no body, pass null as the body for HMAC
const hmac = generateHmacSignature(timestamp, null, secretKey);
// Make the API request
const response = await axios.get(apiEndpoint + '/game/nft/credit', {
headers: {
apikey: apiKey,
signature: hmac,
timestamp: timestamp
}
});
// Process the response
console.log(`Remaining NFT credit: ${response.data.credit.remaining}`);
console.log(`Total NFT credit: ${response.data.credit.total}`);
console.log(`Credit reset time: ${response.data.credit.reset}`);