Get Chip Info
Get information about in-game chips for a game
Retrieves information about in-game chips associated with a specific game.
Endpoint: /game/chip/info
Method: GET
{
gameId: string; // The ID of the game
}
{
chips: {
address: string; // The address of the chip token
name: string; // The name of the chip
symbol: string; // The symbol of the chip
image?: string; // Optional URL to the chip's image
}[];
}
{
error: string;
details?: any;
}
Example Usage
// Setup request parameters
const timestamp = Date.now().toString();
const gameId = 'game123';
// 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/chip/info?gameId=${gameId}`, {
headers: {
apikey: apiKey,
signature: hmac,
timestamp: timestamp
}
});
// Process the response
response.data.chips.forEach((chip) => {
console.log(`Chip Name: ${chip.name}`);
console.log(`Chip Symbol: ${chip.symbol}`);
console.log(`Chip Address: ${chip.address}`);
if (chip.image) {
console.log(`Chip Image: ${chip.image}`);
}
console.log('---');
});
Last updated