GPTFinancial provides a RESTful JSON API for real-time market data, technical indicators, and AI-powered financial analysis. All endpoints return JSON responses.
All API requests require authentication via an API key. Include your key in one of these ways:
X-API-Key: your_api_key_here
Authorization: Bearer your_api_key_here
GET /api/v1/quote/AAPL?api_key=your_api_key_here
Get your free API key at gptfinancial.co (100 calls/month free).
https://api.gptfinancial.co
| Plan | Calls/Month | Requests/Minute |
|---|---|---|
| Free | 100 | 5 |
| Starter ($49/mo) | 5,000 | 30 |
| Professional ($199/mo) | 50,000 | 100 |
| Enterprise ($499/mo) | Unlimited | 500 |
When rate limited, you'll receive a 429 status with retry_after in seconds.
Register for a free API key. No authentication required.
Free| Field | Type | Description |
|---|---|---|
| email required | string | Your email address |
| company | string | Company name (optional) |
curl -X POST https://api.gptfinancial.co/api/v1/register \
-H "Content-Type: application/json" \
-d '{"email": "your@email.com"}'
{
"success": true,
"customer_id": "cust_abc123",
"email": "your@email.com",
"tier": "free",
"api_key": "gptfin_live_xxx...",
"calls_per_month": 100,
"message": "Save your API key securely!"
}
Get real-time price quote for any stock or cryptocurrency.
1 API call| Parameter | Description |
|---|---|
| symbol required | Stock ticker (AAPL, TSLA) or crypto (BTC, ETH) |
curl https://api.gptfinancial.co/api/v1/quote/AAPL \
-H "X-API-Key: your_api_key"
{
"success": true,
"symbol": "AAPL",
"price": 277.55,
"change_24h": 0.58,
"change_pct_24h": 0.21,
"timestamp": "2025-11-27T19:17:26Z",
"response_time_ms": 45
}
Get technical indicators including RSI, MACD, Bollinger Bands, and moving averages.
2 API calls| Field | Description |
|---|---|
| rsi_14 | 14-day Relative Strength Index (0-100) |
| macd | MACD line value |
| macd_signal | MACD signal line |
| macd_histogram | MACD histogram |
| sma_20/50/200 | Simple Moving Averages |
| ema_12/26 | Exponential Moving Averages |
| bollinger_upper/middle/lower | Bollinger Bands |
| atr_14 | 14-day Average True Range |
| trend | Overall trend: BULLISH, BEARISH, or NEUTRAL |
| signals | Array of buy/sell signals |
curl https://api.gptfinancial.co/api/v1/technicals/TSLA \
-H "X-API-Key: your_api_key"
Deep AI-powered analysis combining market data, technicals, fundamentals, and macro factors.
10 API calls| Parameter | Description |
|---|---|
| type | Asset type: auto, stock, crypto (default: auto) |
curl "https://api.gptfinancial.co/api/v1/analyze/BTC?type=crypto" \
-H "X-API-Key: your_api_key"
Analyze multiple assets in a single request.
5 API calls per symbol{
"symbols": ["AAPL", "MSFT", "GOOGL", "BTC"]
}
Maximum 20 symbols per request.
Generate a professional PDF analysis report. Returns binary PDF data.
15 API callsContent-Type: application/pdf
Content-Disposition: attachment; filename="AAPL_report.pdf"
curl -H "X-API-Key: your_api_key" \
https://api.gptfinancial.co/api/v1/report/AAPL \
-o aapl_report.pdf
Check your API usage and remaining quota.
Free{
"tier": "free",
"calls_used": 42,
"calls_limit": 100,
"calls_remaining": 58,
"reset_at": "2025-12-01T00:00:00Z",
"rate_limit_per_minute": 5,
"features": ["quote", "technicals"]
}
All errors return JSON with an error field:
| Status | Description |
|---|---|
| 400 | Bad request - invalid parameters |
| 401 | Unauthorized - invalid or missing API key |
| 403 | Forbidden - endpoint not available on your plan |
| 404 | Not found - symbol or endpoint not found |
| 429 | Rate limited - too many requests |
| 500 | Server error |
{
"valid": false,
"error": "Monthly API limit exceeded",
"calls_used": 100,
"calls_limit": 100,
"upgrade_url": "https://gptfinancial.co/#pricing"
}
import requests
API_KEY = "your_api_key"
BASE_URL = "https://api.gptfinancial.co"
headers = {"X-API-Key": API_KEY}
# Get quote
response = requests.get(f"{BASE_URL}/api/v1/quote/AAPL", headers=headers)
data = response.json()
print(f"AAPL: ${data['price']}")
# Get technicals
response = requests.get(f"{BASE_URL}/api/v1/technicals/AAPL", headers=headers)
technicals = response.json()
print(f"RSI: {technicals['indicators']['rsi_14']}")
print(f"Trend: {technicals['trend']}")
const API_KEY = 'your_api_key';
const BASE_URL = 'https://api.gptfinancial.co';
async function getQuote(symbol) {
const response = await fetch(`${BASE_URL}/api/v1/quote/${symbol}`, {
headers: { 'X-API-Key': API_KEY }
});
return response.json();
}
// Usage
const quote = await getQuote('AAPL');
console.log(`AAPL: $${quote.price}`);
# Get quote
curl -H "X-API-Key: your_api_key" \
https://api.gptfinancial.co/api/v1/quote/AAPL
# Get technicals
curl -H "X-API-Key: your_api_key" \
https://api.gptfinancial.co/api/v1/technicals/TSLA
# Register (no auth required)
curl -X POST https://api.gptfinancial.co/api/v1/register \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com"}'