Quick start
https://qrep-api.tigzig.com/mcphttps://qrep-api.tigzig.com/v1Documentation
The full reference. Every endpoint, every field, and every enforced limit with the message you get when you cross it. Rendered from the running service, so it is never a copy that can fall behind.
The machine contract for this API. The site-wide directory of every TigZig API is the RFC 9727 catalog at api.tigzig.com/.well-known/api-catalog.
What you can call
1 endpoint. Request bodies, every field and every enforced limit are in the full reference.
| GET | /v1/compare | Mcp Compare |
Live tool
Overviewwhat this API covers
The compare endpoint is a plain GET, no key: https://qrep-api.tigzig.com/v1/compare?symbols=AAPL,MSFT&start_date=2024-01-01&end_date=2024-12-31&benchmark=SPY (symbols, start_date, end_date are required; benchmark defaults to SPY). Also available via the MCP server below.
QREP compares up to 6 securities against a benchmark (default SPY) and returns 81 QuantStats metrics per symbol - CAGR, Sharpe, Sortino, Max Drawdown, volatility and more. Powered by the QuantStats library by Ran Aroussi. Same engine behind the QREP app.
Two access shapes over the same backend:
- REST - the open
GET /v1/compareendpoint, no API key. For any HTTP client. - MCP - the
mcp_compare_securitiestool over the/mcptransport below, also no key. Built for AI agent clients; it calls the same compare endpoint.
The open-source backend also has /qpulse/* report endpoints (single-symbol analysis, multi-symbol compare, portfolio, HTML report + CSV export) that power the QREP frontend. Those are API-key gated and meant for self-hosting - they are not part of this hosted public surface. To build your own frontend, self-host and set your own QPULSE_API_KEY (see Build your own below).
MCP Server (for AI agents)connecting an agent over MCP
Connect an AI agent (Claude.ai, Cursor, n8n, custom clients) and let it compare securities directly. No auth. One endpoint:
https://qrep-api.tigzig.com/mcp- Streamable HTTP, the recommended transport (MCP spec 2025-03-26).
Tool: mcp_compare_securities - compare up to 6 symbols against a benchmark, 81 QuantStats metrics each. It is the only tool the server exposes, and it calls the same open GET /v1/compare endpoint. Parameters:
symbols: "AAPL,MSFT,GOOG" (comma-separated, max 6)
benchmark: "SPY" (default)
start_date: "2020-01-01" (YYYY-MM-DD)
end_date: "2025-12-31" (YYYY-MM-DD)
risk_free_rate: 0.045 (decimal, optional)
Example prompt: "Compare AAPL, MSFT and GOOG against SPY from 2020-01-01 to 2025-12-31."
Add to Claude.ai: Settings -> Connectors -> Add custom connector -> paste the Streamable HTTP URL -> approve. The same URL works for Cursor, n8n, and any MCP client.
How it worksthe stack, and the public endpoint
- FastAPI backend + the
fastapi-mcppackage, which exposes FastAPI endpoints as MCP tools. - The public compare endpoint is a GET at
/v1/compare- no API key needed; the MCP tool wraps it. - Metrics computed with the ranaroussi/quantstats library; prices from Yahoo Finance via yfinance (stocks, ETFs, metals, crypto).
- Rate limited per IP with per-IP concurrency controls; deployed on Coolify (Hetzner) behind Cloudflare.
What is new
- 18 Sep 2026 The agent data surface passes 40 million rows, with ball-by-ball cricket alongside mutual funds, macro and filingsAll APIs
- 17 Sep 2026 Pull 81 risk and performance metrics into Excel with one WEBSERVICE formula
- 7 Sep 2026 Error responses carry a hint field: read the body, not just the status codeAll APIs
- 30 Aug 2026 Public status page for every API: is it you, or is it me?All APIs
- 4 Aug 2026 Four routes into QuantStats, depending on what your AI can do
Everything that changed, newest first - the full log across every API and app.
Guidesthe written walkthroughs
This page is the reference - what the endpoints are and how to call them. The guides below are the long-form versions, with worked examples and the edges you only meet in real use:
- Four routes into QuantStats - Start here. comparing securities on returns, risk and drawdowns, with the route to pick set by what your AI can already do.
- Demystifying the API errors - what each error actually means and what to do about it, instead of guessing from a status code. Covers every TigZig API, not just this one.
- Your agents and scripts have been talking to me - what real callers actually do, read out of the server logs: the common mistakes, what works, and the patterns worth copying.
- Is it you, or is it me? - the public status page for every TigZig API, so you can check whether a failure is at your end or ours before you start debugging.
Each is a plain page with a Markdown twin, so you can hand a URL straight to an agent. Come back to this page when you want parameter-level detail.
Rate limitsthe per-IP limits in full
Published so a well-behaved client can plan around them. These are per-IP limits:
- Per IP: 60 requests / minute.
- Up to 6 symbols per request.
You get a 429 with Retry-After and a body telling you to batch to the cap and run batches sequentially.
Avoiding 429s: Batch symbols up to the cap in one call and run batches sequentially. Report-generating endpoints are serialised, so parallel calls queue rather than finish faster. The self-host-only /qpulse/* report endpoints have their own limits and require an API key.
Every successful response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix epoch seconds), read straight from the running limiter, and Retry-After is set on 429. The current numbers are also published as machine-readable JSON at https://qrep-api.tigzig.com/, derived from live config. Read those at runtime rather than hard-coding the figures above - limits change, and these channels change with them.
Try itan example, paste into a browser
No key, no signup.
https://qrep-api.tigzig.com/v1/compare?symbols=AAPL%2CMSFT&start_date=2023-01-01&end_date=2023-12-31
{
"success": true,
"benchmark": "SPY",
"start_date": "2023-01-01",
"end_date": "2023-12-31",
"risk_free_rate": 0,
"symbols": [
{
"symbol": "AAPL",
"success": true,
"trading_days": 249,
"error": null,
"all_metrics": {
"Start Period": "2023-01-04",
"End Period": "2023-12-29",
"Risk-Free Rate": 0,
"Time in Market": 1,
"Cumulative Return": 0.55,
"CAGR﹪": 0.56,
"Sharpe": 2.32,
"Prob. Sharpe Ratio": 0.99,
"Smart Sharpe": 2.2,
"Sortino": 3.71,
"Smart Sortino": 3.51,
"Sortino/√2": 2.62,
"Smart Sortino/√2": 2.49,
"Omega": 1.46,
"Max Drawdown": -0.14932,
"Max DD Date": "2023-10-26",
"Max DD Period Start": "2023-07-31",
"Max DD Period End": "2023-12-12",
"Longest DD Days": 94,
"Volatility (ann.)": 0.2,
"R^2": 0.52,
"Information Ratio": 0.1,
"Calmar": 3.72,
"Skew": 0.01,
...Open-source editionthe open-source reference server
There is an open-source edition of this comparison backend - an earlier release you can run as your own service or borrow components from. Treat it as a reference implementation rather than a mirror of what is running here: the hosted service has moved on since.
github.com/amararun/qrep-backend-fastapi
Built on FastAPI, fastapi-mcp, QuantStats, yfinance.