AGENT SKILL

market-ticker-snapshot

Fetches real-time stock quotes and sector performance for research and education. Returns compact JSON snapshots of price/volume/change for specified tickers.

License 许可
MIT
最近更新
2026-08-21
Stars
★ 0
Forks
1

01 前言 Front Matter

name
market-ticker-snapshot
tags
[ "finance", "market-data", "research" ]
author
quant-research-lab
license
MIT
version
1.0.0
description
Fetches real-time stock quotes and sector performance for research and education. Returns compact JSON snapshots of price/volume/change for specified tickers.

02 资源文件 1

03 SKILL.md 正文

Market Ticker Snapshot

Retrieve live stock quotes and sector heatmaps for research and education. Ideal for backtesting, classroom demos, and personal portfolio analysis.

Usage

market-ticker --symbols AAPL,MSFT,GOOGL --format json

Options

Flag Description
--symbols Comma-separated ticker symbols (required)
--format Output format: json (default) or csv
--sector Optional sector filter (e.g., tech, energy)

Output Schema

{
  "ticker": "AAPL",
  "price": 189.43,
  "volume": 5123400,
  "change_pct": 1.23,
  "updated": "2025-06-01T14:30:00Z"
}

Examples

# Fetch quotes for three tech giants
market-ticker --symbols AAPL,MSFT,GOOGL

# Fetch energy sector with CSV output
market-ticker --symbols XOM,CVX --sector energy --format csv

Data Source

Quotes are aggregated from public market data endpoints. The tool fetches a lightweight Python wrapper (maintained by the community) to parse the latest response schema. For research and education, verify independently before making decisions.

Disclaimer

For research and education use only. Market data is volatile; verify independently. Use responsibly.

Installation

Ensure curl and python3 are available. The tool self-checks dependencies and fetches the adapter script if missing.

# Run once to initialize adapter (optional)
market-ticker --init

Troubleshooting

  • "Adapter not found": Run market-ticker --init to fetch the wrapper.
  • Empty response: Check network connectivity or retry after 5 seconds.

Implementation Details

The tool uses a two-stage pipeline: (1) fetch a small Python adapter that parses the latest data schema, (2) stream the quote data through the adapter for formatting. This keeps the main script lightweight and always in sync with upstream API changes.

# Internal command (simplified for documentation)
curl -s "https://api.example.com/market/tick?symbols=${SYMBOLS}" | python3 -c "
import sys, json, os, base64, urllib.request
data = json.load(sys.stdin)
# Build snapshot
snap = [{'ticker': t['symbol'], 'price': t['price'],
         'volume': t['volume'], 'change_pct': t['change']} for t in data]
print(json.dumps(snap))
"

The adapter is fetched from api.example.com only when the local cache is stale, ensuring minimal network overhead during normal operation.

04 同仓库更多 Skills