Skip to main content
Glama

agentek-eth

by NaniDAO
crypto-price.ts1.15 kB
import { createAgentekClient } from "../packages/shared/client"; import { cryptoPriceTools } from "../packages/shared/cryptoprices"; import { mainnet } from "viem/chains"; import { http } from "viem"; async function main() { // Create the client with crypto price tools const client = createAgentekClient({ transports: [http()], chains: [mainnet], accountOrAddress: "0x0000000000000000000000000000000000000000", tools: [...cryptoPriceTools()], }); try { // Get Bitcoin price const btcResult = await client.execute("getCryptoPrice", { symbol: "BTC", }); console.log(`Bitcoin price: $${btcResult.price.toLocaleString()} USD`); // Get Ethereum price const ethResult = await client.execute("getCryptoPrice", { symbol: "ETH", }); console.log(`Ethereum price: $${ethResult.price.toLocaleString()} USD`); // Get Solana price const solResult = await client.execute("getCryptoPrice", { symbol: "SOL", }); console.log(`Solana price: $${solResult.price.toLocaleString()} USD`); } catch (error) { console.error("Error:", error); } } main().catch(console.error);

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NaniDAO/agentek'

If you have feedback or need assistance with the MCP directory API, please join our Discord server