Overview
A financial-data extraction service over yfinance. It exposes Yahoo Finance financial statements, market data and OHLCV price histories for any ticker, over the same backend two ways:
- REST + Swagger at
yfin-h.tigzig.com/*for any HTTP client -/get-all-prices/,/get-balance-sheet/,/get-income-statement/,/get-cash-flow/,/get-detailed-info/,/get-market-data/, quarterly variants, and Excel-friendly/excel/*endpoints. - MCP for AI agent clients - the same data as tool calls (see below).
Most endpoints take a tickers query param (comma-separated for multiple symbols); price endpoints add start_date / end_date. See the full parameter list in the API Endpoints section below or try them in Swagger.
MCP Server (for AI agents)
Connect an AI agent (Claude.ai, Cursor, n8n, custom clients) and let it pull statements and prices directly. No auth. Three transports:
https://yfin-h.tigzig.com/v1/mcp/http- Streamable HTTP (recommended; MCP spec 2025-03-26).https://yfin-h.tigzig.com/v1/mcp/sse- SSE (legacy fallback).https://yfin-h.tigzig.com/mcp- original SSE endpoint, kept for back-compat.
Add to Claude.ai: Settings -> Connectors -> Add custom connector -> paste the Streamable HTTP URL (fall back to SSE if needed) -> approve. The same URLs work for Cursor, n8n, and any MCP client.
How it works
- Financial statements - balance sheet, income statement, cash flow; annual and quarterly; JSON or Excel-friendly formats.
- Market data - historical OHLCV with adjustments, market cap and share statistics, detailed company info.
- FastAPI backend + the
fastapi-mcppackage (exposes FastAPI endpoints as MCP tools), with Pydantic request/response validation. - Deployed on Coolify (Hetzner) behind Cloudflare.
Build your own (open source)
Clone the repo and run your own instance:
- Clone github.com/amararun/shared-yfin-coolify
pip install -r requirements.txtuvicorn main:app --reload- MCP endpoint athttp://localhost:8000/mcp.
Key dependencies: FastAPI, fastapi-mcp, yfinance, pandas.
API Endpoints (REST / HTTP)
https://yfin-h.tigzig.comPrepend this to every path listed below (e.g. /series becomes https://yfin-h.tigzig.com/series). The curl example on each card shows the full URL.Generated from the live OpenAPI spec - always in sync with the API. Try them interactively in Swagger.
/excel/get-balance-sheet/
Get Balance Sheet Excel Endpoint
Retrieves annual balance sheets for specified Yahoo Finance tickers in a structured JSON format.
| Param | In | Type | Description | |
|---|---|---|---|---|
tickers | query | string | required | Comma-separated list of Yahoo Finance ticker symbols (e.g., 'AAPL,MSFT,GOOG') |
curl "https://yfin-h.tigzig.com/excel/get-balance-sheet/?tickers=AAPL"/excel/get-cash-flow/
Get Cash Flow Excel Endpoint
Retrieves annual cash flow statements for specified Yahoo Finance tickers in a structured JSON format.
| Param | In | Type | Description | |
|---|---|---|---|---|
tickers | query | string | required | Comma-separated list of Yahoo Finance ticker symbols (e.g., 'AAPL,MSFT,GOOG') |
curl "https://yfin-h.tigzig.com/excel/get-cash-flow/?tickers=AAPL"/excel/get-income-statement/
Get Income Statement Excel Endpoint
Retrieves annual income statements for specified Yahoo Finance tickers in a structured JSON format.
| Param | In | Type | Description | |
|---|---|---|---|---|
tickers | query | string | required | Comma-separated list of Yahoo Finance ticker symbols (e.g., 'AAPL,MSFT,GOOG') |
curl "https://yfin-h.tigzig.com/excel/get-income-statement/?tickers=AAPL"/excel/get-quarterly-cash-flow/
Get Quarterly Cash Flow Excel Endpoint
Retrieves quarterly cash flow statements for specified Yahoo Finance tickers in a structured JSON format.
| Param | In | Type | Description | |
|---|---|---|---|---|
tickers | query | string | required | Comma-separated list of Yahoo Finance ticker symbols (e.g., 'AAPL,MSFT,GOOG') |
curl "https://yfin-h.tigzig.com/excel/get-quarterly-cash-flow/?tickers=AAPL"/excel/get-quarterly-income-statement/
Get Quarterly Income Statement Excel Endpoint
Retrieves quarterly income statements for specified Yahoo Finance tickers in a structured JSON format.
| Param | In | Type | Description | |
|---|---|---|---|---|
tickers | query | string | required | Comma-separated list of Yahoo Finance ticker symbols (e.g., 'AAPL,MSFT,GOOG') |
curl "https://yfin-h.tigzig.com/excel/get-quarterly-income-statement/?tickers=AAPL"/get-adj-close/
Get Adj Close Endpoint
| Param | In | Type | Description | |
|---|---|---|---|---|
tickers | query | string | required | |
start_date | query | string | required | |
end_date | query | string | required |
curl "https://yfin-h.tigzig.com/get-adj-close/?tickers=AAPL&start_date=2020-01-01&end_date=2024-12-31"/get-all-prices/
Get All Prices Endpoint
Fetches comprehensive historical price data for specified Yahoo Finance tickers.
| Param | In | Type | Description | |
|---|---|---|---|---|
tickers | query | string | required | Comma-separated list of Yahoo Finance ticker symbols (e.g., 'AAPL,MSFT,GOOG') |
start_date | query | string | required | Start date in YYYY-MM-DD format (e.g., '2023-01-01') |
end_date | query | string | required | End date in YYYY-MM-DD format (e.g., '2023-12-31') |
format | query | string | optional | Response format: 'json' (default) returns nested JSON, 'tsv' returns compact tab-delimited string optimized for LLM context windows (~70% fewer tokens) |
curl "https://yfin-h.tigzig.com/get-all-prices/?tickers=AAPL&start_date=2020-01-01&end_date=2024-12-31&format=parquet"/get-balance-sheet/
Get Balance Sheet Endpoint
| Param | In | Type | Description | |
|---|---|---|---|---|
tickers | query | string | required |
curl "https://yfin-h.tigzig.com/get-balance-sheet/?tickers=AAPL"/get-cash-flow/
Get Cash Flow Endpoint
| Param | In | Type | Description | |
|---|---|---|---|---|
tickers | query | string | required |
curl "https://yfin-h.tigzig.com/get-cash-flow/?tickers=AAPL"/get-detailed-info/
Get Detailed Info Endpoint
Retrieves comprehensive company information and data points from Yahoo Finance.
| Param | In | Type | Description | |
|---|---|---|---|---|
tickers | query | string | required | Comma-separated list of Yahoo Finance ticker symbols (e.g., 'AAPL,MSFT,GOOG') |
curl "https://yfin-h.tigzig.com/get-detailed-info/?tickers=AAPL"/get-income-statement/
Get Income Statement Endpoint
| Param | In | Type | Description | |
|---|---|---|---|---|
tickers | query | string | required |
curl "https://yfin-h.tigzig.com/get-income-statement/?tickers=AAPL"/get-market-data/
Get Market Data
Fetches key market data metrics for specified stock tickers from Yahoo Finance.
| Param | In | Type | Description | |
|---|---|---|---|---|
tickers | query | string | required | Comma-separated list of Yahoo Finance ticker symbols (e.g., 'AAPL,MSFT,GOOG') |
curl "https://yfin-h.tigzig.com/get-market-data/?tickers=AAPL"/get-quarterly-cash-flow/
Get Quarterly Cash Flow Endpoint
| Param | In | Type | Description | |
|---|---|---|---|---|
tickers | query | string | required |
curl "https://yfin-h.tigzig.com/get-quarterly-cash-flow/?tickers=AAPL"/get-quarterly-income-statement/
Get Quarterly Income Statement Endpoint
| Param | In | Type | Description | |
|---|---|---|---|---|
tickers | query | string | required |
curl "https://yfin-h.tigzig.com/get-quarterly-income-statement/?tickers=AAPL"