Query real-time stock prices and market data using the Stock Prices API. Responses are in TOON format—decode with @toon-format/toon. Use when fetching stock...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install stock-prices或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install stock-prices⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/stock-prices/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: stock-prices description: Query real-time stock prices and market data using the Stock Prices API. Responses are in TOON format—decode with @toon-format/toon. Use when fetching stock quotes, analyzing market data, or working with symbols like AAPL, NVDA, GOOGL, or any ticker symbols. ---
This skill helps you work with the Stock Prices API to fetch real-time market data and stock quotes.
Base URL: https://stock-prices.on99.app
Primary Endpoint: /quotes?symbols={SYMBOLS}
Fetch stock quotes for one or more symbols (responses are in TOON format):
curl "https://stock-prices.on99.app/quotes?symbols=NVDA"
curl "https://stock-prices.on99.app/quotes?symbols=AAPL,GOOGL,MSFT"
Install the TOON decoder for parsing: pnpm add @toon-format/toon
The API returns TOON (Token-Oriented Object Notation) format—a compact, human-readable encoding that uses ~40% fewer tokens than JSON. This makes it ideal for LLM prompts and streaming.
quotes[1]{symbol,currentPrice,change,percentChange,highPrice,lowPrice,openPrice,previousClosePrice,preMarketPrice,preMarketChange,preMarketTime,preMarketChangePercent,...}:
NVDA,188.54,-1.5,-0.789308,192.48,188.12,191.405,190.04,191.8799,3.3399048,2026-02-11T13:49:16.000Z,1.771457,...
Use @toon-format/toon to parse responses back to JavaScript/JSON:
import { decode } from "@toon-format/toon";
const response = await fetch("https://stock-prices.on99.app/quotes?symbols=NVDA");
const toonText = await response.text();
const data = decode(toonText);
// data.quotes is an array of quote objects
const quote = data.quotes[0];
console.log(`${quote.symbol}: $${quote.currentPrice}`);
The decoded structure matches JSON—same objects, arrays, and primitives.
| Field | Type | Description | | ------------------------ | ----------------- | ------------------------------------- | | symbol | string | Stock ticker symbol | | currentPrice | number | Current trading price | | change | number | Price change from previous close | | percentChange | number | Percentage change from previous close | | highPrice | number | Day's high price | | lowPrice | number | Day's low price | | openPrice | number | Opening price | | previousClosePrice | number | Previous day's closing price | | preMarketPrice | number | Pre-market trading price | | preMarketChange | number | Pre-market price change | | preMarketTime | string (ISO 8601) | Pre-market data timestamp | | preMarketChangePercent | number | Pre-market percentage change |
Query multiple stocks by separating symbols with commas (max 50):
curl "https://stock-prices.on99.app/quotes?symbols=AAPL,GOOGL,MSFT,TSLA,AMZN"
Always check for valid responses. Decode TOON before accessing data:
import { decode } from "@toon-format/toon";
const response = await fetch("https://stock-prices.on99.app/quotes?symbols=NVDA");
const data = decode(await response.text());
if (data.quotes && data.quotes.length > 0) {
const quote = data.quotes[0];
console.log(`${quote.symbol}: $${quote.currentPrice}`);
}
Calculate common metrics:
// Determine if stock is up or down
const isUp = quote.change > 0;
const direction = isUp ? "📈" : "📉";
// Calculate day's range percentage
const rangePct = ((quote.highPrice - quote.lowPrice) / quote.lowPrice) * 100;
// Compare current to open
const vsOpen = quote.currentPrice - quote.openPrice;
import { decode } from "@toon-format/toon";
async function checkPrice(symbol: string) {
const res = await fetch(`https://stock-prices.on99.app/quotes?symbols=${symbol}`);
const data = decode(await res.text());
const quote = data.quotes[0];
return {
price: quote.currentPrice,
change: quote.change,
changePercent: quote.percentChange,
};
}
import { decode } from "@toon-format/toon";
async function getPortfolio(symbols: string[]) {
const symbolString = symbols.join(",");
const res = await fetch(`https://stock-prices.on99.app/quotes?symbols=${symbolString}`);
const data = decode(await res.text());
return data.quotes.map(q => ({
symbol: q.symbol,
value: q.currentPrice,
dailyChange: q.percentChange,
}));
}
import { decode } from "@toon-format/toon";
async function marketSummary(symbols: string[]) {
const res = await fetch(`https://stock-prices.on99.app/quotes?symbols=${symbols.join(",")}`);
const data = decode(await res.text());
const gainers = data.quotes.filter(q => q.change > 0);
const losers = data.quotes.filter(q => q.change < 0);
return {
totalStocks: data.quotes.length,
gainers: gainers.length,
losers: losers.length,
avgChange: data.quotes.reduce((sum, q) => sum + q.percentChange, 0) / data.quotes.length,
};
}
AAPL - AppleGOOGL - Alphabet (Google)META - Meta (Facebook)AMZN - AmazonNFLX - NetflixMSFT - MicrosoftNVDA - NVIDIATSLA - TeslaAMD - Advanced Micro DevicesINTC - IntelORCL - Oracle^GSPC - S&P 500^DJI - Dow Jones^IXIC - NASDAQdecode() from @toon-format/toon to parse.安装 Stock Prices 后,可以对 AI 说这些话来触发它
Help me get started with Stock Prices
Explains what Stock Prices does, walks through the setup, and runs a quick demo based on your current project
Use Stock Prices to query real-time stock prices and market data using the Stock Prices...
Invokes Stock Prices with the right parameters and returns the result directly in the conversation
What can I do with Stock Prices in my finance & investment workflow?
Lists the top use cases for Stock Prices, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/stock-prices/ 目录(个人级,所有项目可用),或 .claude/skills/stock-prices/(项目级)。重启 AI 客户端后,用 /stock-prices 主动调用,或让 AI 根据上下文自动发现并使用。
Stock Prices 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Stock Prices 可免费安装使用。请查阅仓库了解许可证信息。
Query real-time stock prices and market data using the Stock Prices API. Responses are in TOON format—decode with @toon-format/toon. Use when fetching stock...
Stock Prices 属于「Finance & Investment」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my finance & investment tasks using Stock Prices
Identifies repetitive steps in your workflow and sets up Stock Prices to handle them automatically