stbtcx_price
Retrieve current price and market information for the STBTCx token to monitor cryptocurrency values.
Instructions
Get current STBTCx token price and market info
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/modules/finance.ts:97-110 (handler)The handler for the stbtcx_price tool, which fetches current STBTCx market information from the CoinGecko API and returns it as a formatted text response.
server.tool("stbtcx_price", "Get current STBTCx token price and market info", {}, async () => { const contract = "386JZJtkvf43yoNawAHmHHeEhZWUTZ4UuJJtxC9fpump"; let price = 1.00; try { const data = await safeFetch("https://api.coingecko.com/api/v3/simple/price?ids=stbtcx&vs_currencies=usd&include_24hr_change=true&include_market_cap=true"); if (data.stbtcx) { price = data.stbtcx.usd; const change = data.stbtcx.usd_24h_change?.toFixed(2) || "0"; const mcap = data.stbtcx.usd_market_cap?.toLocaleString() || "N/A"; return { content: [{ type: "text", text: `**STBTCx** (Standard Bitcoin X)\nPrice: $${price}\n24h Change: ${change}%\nMarket Cap: $${mcap}\nContract: \`${contract}\`\nNetwork: Solana\nDEX: pump.fun | Jupiter | Raydium` }] }; } } catch {} return { content: [{ type: "text", text: `**STBTCx** (Standard Bitcoin X)\nPrice: ~$${price} (1:1 USD parity)\nContract: \`${contract}\`\nNetwork: Solana Mainnet\nBuy: https://pump.fun/coin/${contract}` }] }; });