get_token_prices
Retrieve comprehensive market data including prices, market cap, trading volume, and price changes for specific cryptocurrency tokens on the KAIA blockchain.
Instructions
Get comprehensive market data including prices, market capitalization, 24h trading volume, and 24h price changes for specific token symbols (e.g., 'KAIA', 'BTC', 'ETH', 'BORA')
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbols | Yes | Array of token symbols to get comprehensive market data for (e.g., ['KAIA', 'BTC', 'ETH']) |
Implementation Reference
- src/tools/price-api/price.ts:74-100 (handler)The `getTokenPrices` function, which fetches all available prices and filters them based on the provided list of symbols.
export const getTokenPrices = async (symbols: string[]) => { try { const allPricesResult = await getAllPrices(); if (!allPricesResult.success) { return allPricesResult; } const filteredPrices = (allPricesResult.prices || []).filter((price: any) => symbols.includes(price.symbol) ); return { success: true, prices: filteredPrices, count: filteredPrices.length, requestedSymbols: symbols, foundSymbols: filteredPrices.map((price: any) => price.symbol) }; } catch (error: any) { console.error('Error fetching token prices:', error); return { success: false, error: error.message || 'Failed to fetch token prices' }; } };