AgentSkillsCN

fetching-prices

通过Financial Datasets API获取股票和加密货币价格数据。当被问及股票价格、加密价格、历史价格或价格表现时使用。

SKILL.md
--- frontmatter
name: fetching-prices
description: Retrieves stock and cryptocurrency price data via Financial Datasets API. Use when asked about stock prices, crypto prices, historical prices, or price performance.

Fetching Prices

Tools

ToolReturns
get_price_snapshotLatest stock price, volume, OHLC
get_pricesHistorical stock prices
get_crypto_price_snapshotLatest crypto price
get_crypto_pricesHistorical crypto prices
get_available_crypto_tickersList of crypto pairs

Parameters

Historical prices require:

  • start_date, end_date: YYYY-MM-DD format
  • interval: minute, day, week, month, year
  • interval_multiplier: e.g., 5 with minute = 5-min bars

Crypto tickers: Format is BASE-QUOTE (e.g., BTC-USD, ETH-USD)

Examples

Input: "What's Apple's stock price?"

code
get_price_snapshot(ticker: "AAPL")

Output: "Apple (AAPL) is trading at $185.50, up 1.2% today on volume of 45M shares."


Input: "How has NVDA performed this year?"

code
get_prices(ticker: "NVDA", start_date: "2024-01-01", end_date: "2024-12-31", interval: "month")

Output: Calculate return from first to last price: "NVIDIA is up 185% YTD, from $48.50 in January to $138.25 in December."


Input: "Bitcoin price"

code
get_crypto_price_snapshot(ticker: "BTC-USD")

Output: "Bitcoin is trading at $67,500 USD."


Input: "Compare AAPL and MSFT stock performance over 2024"

code
get_prices(ticker: "AAPL", start_date: "2024-01-01", end_date: "2024-12-31")
get_prices(ticker: "MSFT", start_date: "2024-01-01", end_date: "2024-12-31")

Output: Calculate returns for each: "Microsoft (+25%) outperformed Apple (+18%) in 2024."