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 quotes, analyzing market data, or working with symbols like AAPL, NVDA, GOOGL, or any ticker symbols.

3,891 stars

Best use case

stock-prices is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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.

Teams using stock-prices should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/stock-prices/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/anthonylee1994/stock-prices/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/stock-prices/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How stock-prices Compares

Feature / Agentstock-pricesStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Stock Prices API Skill

This skill helps you work with the Stock Prices API to fetch real-time market data and stock quotes.

## API Endpoint

**Base URL**: `https://stock-prices.on99.app`

**Primary Endpoint**: `/quotes?symbols={SYMBOLS}`

## Quick Start

Fetch stock quotes for one or more symbols (responses are in TOON format):

```bash
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`

## Response Format

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.

### TOON Response Example

```
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,...
```

### Decoding TOON Responses

Use `@toon-format/toon` to parse responses back to JavaScript/JSON:

```typescript
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.

## Available Data Fields

| 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          |

## Usage Guidelines

### Multiple Symbols

Query multiple stocks by separating symbols with commas (max 50):

```bash
curl "https://stock-prices.on99.app/quotes?symbols=AAPL,GOOGL,MSFT,TSLA,AMZN"
```

### Error Handling

Always check for valid responses. Decode TOON before accessing data:

```typescript
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}`);
}
```

### Price Analysis

Calculate common metrics:

```typescript
// 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;
```

## Common Use Cases

### 1. Price Monitoring

```typescript
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,
    };
}
```

### 2. Portfolio Tracking

```typescript
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,
    }));
}
```

### 3. Market Summary

```typescript
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,
    };
}
```

## Popular Stock Symbols

### Tech Giants (FAANG+)

- `AAPL` - Apple
- `GOOGL` - Alphabet (Google)
- `META` - Meta (Facebook)
- `AMZN` - Amazon
- `NFLX` - Netflix
- `MSFT` - Microsoft

### High-Profile Stocks

- `NVDA` - NVIDIA
- `TSLA` - Tesla
- `AMD` - Advanced Micro Devices
- `INTC` - Intel
- `ORCL` - Oracle

### Indices

- `^GSPC` - S&P 500
- `^DJI` - Dow Jones
- `^IXIC` - NASDAQ

## Notes

- **Response format**: API returns TOON, not JSON. Use `decode()` from `@toon-format/toon` to parse.
- All prices are in USD
- Data updates in real-time during market hours
- Pre-market and after-hours data is available
- Timestamps are in ISO 8601 format (UTC)
- Maximum 50 symbols per request

Related Skills

openclaw-stock-skill

3891
from openclaw/skills

使用 data.diemeng.chat 提供的接口查询股票日线、分钟线、财务指标等数据,支持 A 股等市场。

Data & Research

us-stock-analyst

3891
from openclaw/skills

Professional US stock analysis with financial data, news, social sentiment, and multi-model AI. Comprehensive reports at $0.02-0.10 per analysis.

Data & Research

stock-watchlist

3891
from openclaw/skills

Query real-time stock prices, basic quote fields, and manage a Markdown watchlist for A-share, Hong Kong, and US stocks. Use when users ask in Chinese or by ticker/code to search stocks, inspect current price and quote basics, or maintain a watchlist stored in a Markdown file.

Personal Finance

jarvis-stock-price - 股票价格查询

3880
from openclaw/skills

**版本**: 1.0.0

Data & Research

jarvis-stock-monitor

3880
from openclaw/skills

全功能智能股票监控预警系统 Pro 版。支持成本百分比、均线金叉死叉、RSI 超买超卖、成交量异动、跳空缺口、动态止盈等 7 大预警规则。基础功能免费,高级功能 SkillPay 付费。

Finance & Trading

SKILL: stock-checker

3891
from openclaw/skills

## Description

akshare-a-stock

3891
from openclaw/skills

A股量化数据分析工具,基于AkShare库获取A股、港股、美股行情、财务数据、板块分析等。用于回答关于股票查询、行情数据、财务分析、资金流向、龙虎榜、涨停跌停、新股IPO、融资融券等问题。

Stock Skill - 股票查询

3891
from openclaw/skills

获取A股、港股、美股的实时行情数据。

stock-query

3891
from openclaw/skills

查询全球主要市场股票实时行情:A 股、港股、美股,以及场内 ETF、场外基金、主要指数。 需要:curl(HTTP 请求)、iconv(GBK→UTF-8 转码)。 Use when: 用户要求查询股价、基金净值、ETF 价格、大盘指数,或需要计算持仓市值时。 NOT for: 加密货币、期货、期权、外汇。

cn-stock-query

3891
from openclaw/skills

查询中国 A 股股票、场内 ETF 及场外基金的实时行情与最新净值。 Use when: 用户要求查询股价、基金净值、ETF 价格,或需要计算持仓市值时。 NOT for: 美股(含中概 ADR)、港股、加密货币、期货、期权。

openclaw-livestock-assistant

3891
from openclaw/skills

AI-powered livestock management assistant for Spanish-speaking farmers. Provides expert advice on herd management, animal health, reproduction, genetics, nutrition, and breed selection for bovine, ovine, caprine, porcine, equine, and poultry. Includes a Node.js REST API for persistent herd record-keeping (animal registration, health records, reproduction events). Use when the user asks about livestock, cattle, ganadería, herd management, animal health, veterinary advice, breeds, reproduction, nutrition, forage, or any livestock-related topic.

free-stock-global-quotes-news

3891
from openclaw/skills

global-quotes: free stock quotes and news. Use when: user asks for global stock price, quote, ticker symbol, or company news for US (e.g. AAPL), HK (0700.HK), or China A-shares (000001.SZ, 600000.SS). Uses free sources: Yahoo/Finnhub for US, Tencent/EastMoney/AkShare for CN/HK.