fmp-api

from adaptationio/skrillz

No description

2 stars0 forksUpdated Jan 16, 2026
npx skills add https://github.com/adaptationio/skrillz --skill fmp-api

SKILL.md

Financial Modeling Prep (FMP) API Integration

Comprehensive financial data API specializing in fundamental analysis, SEC filings, institutional holdings (13F), congressional trading data, and pre-computed valuations.

Quick Start

Authentication

# Environment variable (recommended)
export FMP_API_KEY="your_api_key"

# Or in .env file
FMP_API_KEY=your_api_key

Basic Usage (Python)

import requests
import os

API_KEY = os.getenv("FMP_API_KEY")
BASE_URL = "https://financialmodelingprep.com/stable"

def get_quote(symbol: str) -> dict:
    """Get real-time quote for a symbol."""
    response = requests.get(
        f"{BASE_URL}/quote",
        params={"symbol": symbol, "apikey": API_KEY}
    )
    data = response.json()
    return data[0] if data else {}

# Example
quote = get_quote("AAPL")
print(f"AAPL: ${quote['price']:.2f} ({quote['changePercentage']:+.2f}%)")

Important: New Endpoint Format

FMP migrated to /stable/ endpoints. Legacy /api/v3/ endpoints require existing subscriptions.

# NEW format (use this)
BASE_URL = "https://financialmodelingprep.com/stable"

# OLD format (legacy only)
# BASE_URL = "https://financialmodelingprep.com/api/v3"

API Endpoints Reference

Stock Quotes & Prices

EndpointDescriptionFree
/quoteReal-time quote
/quote-shortQuick price
/historical-price-eod/fullHistorical EOD
/historical-price-intradayIntraday prices⚠️ Paid
/pre-post-market-quoteExtended hours⚠️ Paid

Financial Statements

EndpointDescriptionFree
/income-statementIncome statement
/balance-sheet-statementBalance sheet
/cash-flow-statementCash flow
/income-statement-growthIncome growth
/key-metricsKey metrics
/financial-ratiosFinancial ratios
/enterprise-valuesEnterprise value

Valuations & Analysis

EndpointDescriptionFree
/discounted-cash-flowDCF valuation
/historical-discounted-cash-flowHistorical DCF
/ratingCompany rating
/historical-ratingRating history
/company-outlookFull company data

Institutional & Insider Data

EndpointDescriptionFree
/institutional-holderInstitutional owners⚠️ Paid
/mutual-fund-holderMutual fund owners⚠️ Paid
/insider-tradingInsider transactions⚠️ Paid
/form-13f13F filings⚠️ Paid
/senate-tradingSenate trades⚠️ Paid
/house-tradingHouse trades⚠️ Paid

Screening & Discovery

EndpointDescriptionFree
/stock-screenerScreen stocks⚠️ Paid
/stock-gradeStock grades
/searchSearch symbols
/search-nameSearch by name
/profileCompany profile

Calendars & Events

EndpointDescriptionFree
/earnings-calendarEarnings dates
/ipo-calendarIPO dates
/stock-dividend-calendarDividends
/stock-split-calendarStock splits
/economic-calendarEconomic events

SEC Filings

EndpointDescriptionFree
/sec-filingsAll SEC filings
/rss-feed-sec-filingsSEC RSS feed

Rate Limits

TierCalls/DayCalls/MinPrice
Free250N/A$0
StarterUnlimited300$22/mo
PremiumUnlimited750$59/mo
UltimateUnlimited3,000$149/mo

Free tier limitations:

  • ~100 sample symbols (AAPL, TSLA, AMZN, etc.)
  • End-of-day data only
  • 500MB bandwidth (30-day rolling)

Common Tasks

Task: Get Financial Statements

def get_financials(symbol: str, period: str = "annual") -> dict:
    """Get comprehensive financial statements."""

    income = requests.get(
        f"{BASE_URL}/income-statement",
        params={"symbol": symbol, "period": period, "apikey": API_KEY}
    ).json()

    balance = requests.get(
        f"{BASE_URL}/balance-sheet-statement",
        params={"symbol": symbol, "period": period, "apikey": API_KEY}
    ).json()

    cashflow = requests.get(
        f"{BASE_URL}/cash-flow-statement",
        params={"symbol": symbol, "period": period, "apikey": API_KEY}
    ).json()

    return {
        "income_statement": income[0] if income else {},
        "balance_sheet": balance[0] if balance else {},
        "cash_flow": cashflow[0] if cashflow else {}
    }

# Example
financials = get_financials("AAPL")
print(f"Revenue: ${financials['income_statement'].get('revenue', 0):,.0f}")

Task: Get Key Metrics & Ratios

def get_key_metrics(symbol: str) -> dict:
    """Get important financial metrics.

...
Read full content

Repository Stats

Stars2
Forks0