API Reference
Base URL: https://api.quantfetch.ai
All endpoints return JSON. All requests must include Authorization: Bearer <api_key> header.
Authentication
Authenticate with an API key passed as a Bearer token in the Authorization header:
# All requests
Authorization: Bearer qfp_your_api_key_here
Content-Type: application/json
Get your API key from the CLI:
quant > /api-key
# Or via the API:
POST /api/v1/auth/register
POST /api/v1/auth/login
Endpoints
Get current credit balance and subscription tier for the authenticated user.
Create a Polar.sh checkout session to purchase a credit top-up pack.
Body:
Run 4-agent AI analysis (valuation, fundamentals, technicals, sentiment) on a single ticker. Costs 25 credits.
Body:
Get risk metrics for a portfolio or single position. Costs 15 credits.
Body:
Run a Python trading strategy against historical data. Costs 200–500 credits depending on date range.
Body:
List available subscription tiers.
Subscribe to a tier via Polar.sh checkout.
List SEC-registered companies in the QuantFetch database.
Search SEC filings (10-K, 10-Q, 8-K, etc.)
Get latest 13F institutional holdings for a ticker.
Get insider trades (Form 4) for a ticker.
Get OHLCV price data.
Get financial news and earnings announcements.
Error Responses
{
"error": "insufficient_credits",
"message": "Not enough credits. Required: 25. Balance: 12.",
"code": 402
}| 401 | Invalid or missing API key |
| 402 | Insufficient credits for this operation |
| 403 | Feature not available on your tier |
| 404 | Ticker or resource not found |
| 429 | Rate limit exceeded. Upgrade for higher limits. |
| 500 | Internal server error |
Full OpenAPI 3.1 schema available at: GET /docs/api.json