Skip to content
Skillv1.0.0

Financial Data Fetcher

Fetches real-time and historical market data, financial news, and fundamental data for trading decisions

by gracefullight(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from gracefullight/stock-checker (.agents/skills/Financial Data Fetcher/SKILL.md) via skills.sh. Install upstream with npx skills add gracefullight/stock-checker --skill Financial Data Fetcher. Copyright stays with the author.

Financial Data Fetcher Skill

Provides comprehensive market data access for AI trading agents.

Overview

This skill fetches:

  • Real-time and historical OHLCV price data
  • Financial news from multiple sources
  • Fundamental data (P/E ratios, earnings, market cap)
  • Market snapshots and quotes

Tools

1. get_price_data

Fetches historical or real-time price data for symbols.

Parameters:

  • symbols (required): List of ticker symbols (e.g., ["AAPL", "MSFT"])
  • timeframe (optional): "1Min", "5Min", "1Hour", "1Day" (default: "1Day")
  • start_date (optional): Start date in YYYY-MM-DD format
  • end_date (optional): End date in YYYY-MM-DD format
  • limit (optional): Number of bars to fetch (default: 100)

Returns:

{
  "success": true,
  "data": {
    "AAPL": [
      {
        "timestamp": "2025-10-30T09:30:00Z",
        "open": 150.25,
        "high": 151.50,
        "low": 149.80,
        "close": 151.00,
        "volume": 5000000
      }
    ]
  }
}

Usage:

python scripts/fetch_data.py get_price_data --symbols AAPL MSFT --timeframe 1Day --limit 30

2. get_latest_news

Fetches recent financial news for symbols.

Parameters:

  • symbols (required): List of ticker symbols
  • limit (optional): Number of news items (default: 10)
  • sources (optional): News sources to query (default: all)

Returns:

{
  "success": true,
  "data": [
    {
      "symbol": "AAPL",
      "headline": "Apple announces new product line",
      "summary": "...",
      "source": "Bloomberg",
      "url": "https://...",
      "published_at": "2025-10-30T08:00:00Z",
      "sentiment": "positive"
    }
  ]
}

3. get_fundamentals

Fetches fundamental data for symbols.

Parameters:

  • symbols (required): List of ticker symbols
  • metrics (optional): Specific metrics to fetch (default: all)

Returns:

{
  "success": true,
  "data": {
    "AAPL": {
      "market_cap": 3000000000000,
      "pe_ratio": 28.5,
      "eps": 6.42,
      "dividend_yield": 0.52,
      "beta": 1.2,
      "52_week_high": 200.00,
      "52_week_low": 120.00
    }
  }
}

4. get_market_snapshot

Gets current market snapshot with real-time quotes.

Parameters:

  • symbols (required): List of ticker symbols

Returns:

{
  "success": true,
  "data": {
    "AAPL": {
      "price": 151.00,
      "bid": 150.98,
      "ask": 151.02,
      "bid_size": 100,
      "ask_size": 200,
      "last_trade_time": "2025-10-30T15:59:59Z",
      "volume": 50000000,
      "vwap": 150.75
    }
  }
}

Implementation

See scripts/fetch_data.py for full implementation using Alpaca API and yfinance.

Rate Limiting

  • Alpaca API: 200 requests/minute
  • News API: 25 requests/day (free tier)
  • Caching: 5-minute cache for real-time data

Error Handling

All tools return consistent error format:

{
  "success": false,
  "error": "Error message",
  "error_code": "INVALID_SYMBOL"
}

Integration Example

from claude_skills import load_skill

skill = load_skill("financial_data_fetcher")

# Get price data
result = skill.get_price_data(
    symbols=["AAPL", "MSFT"],
    timeframe="1Day",
    limit=30
)

if result["success"]:
    prices = result["data"]
    # Use in trading strategy

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/gracefullight-stock-checker-financial-data-fetcher/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

gracefullight-stock-checker-financial-data-fetcher.ocm.jsonjson
{
  "ocm": "1",
  "id": "gracefullight-stock-checker-financial-data-fetcher",
  "kind": "skill",
  "name": "Financial Data Fetcher",
  "description": "Fetches real-time and historical market data, financial news, and fundamental data for trading decisions",
  "publisher": "gracefullight",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "market-data",
      "trading",
      "finance",
      "real-time",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Fetches real-time and historical market data, financial news, and fundamental data for trading decisions"
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/gracefullight/stock-checker",
      "path": ".agents/skills/Financial Data Fetcher/SKILL.md",
      "ref": "HEAD",
      "url": "https://www.skills.sh/gracefullight/stock-checker/financial-data-fetcher",
      "key": "gracefullight/stock-checker/.agents/skills/Financial Data Fetcher/SKILL.md"
    }
  },
  "instructions": "# Financial Data Fetcher Skill\n\nProvides comprehensive market data access for AI trading agents.\n\n## Overview\n\nThis skill fetches:\n- Real-time and historical OHLCV price data\n- Financial news from multiple sources\n- Fundamental data (P/E ratios, earnings, market cap)\n- Market snapshots and quotes\n\n## Tools\n\n### 1. get_price_data\n\nFetches historical or real-time price data for symbols.\n\n**Parameters:**\n- `symbols` (required): List of ticker symbols (e.g., [\"AAPL\", \"MSFT\"])\n- `timeframe` (optional): \"1Min\", \"5Min\", \"1Hour\", \"1Day\" (default: \"1Day\")\n- `start_date` (optional): Start date in YYYY-M",
  "cost": {
    "context_tokens": 823
  }
}

Fetch it by URL: GET /api/v1/registry/gracefullight-stock-checker-financial-data-fetcher/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.