Finnhub API
Real-time stock, forex, and crypto data
Live Technical Metrics
Pre-calculated · updated every 20 min| Uptime Status | ⬜ Unknown — not yet probed |
|---|---|
| Server Latency | N/A |
| Hosting Server | Not disclosed |
| Content-Type | Not disclosed |
| Cache-Control | Not set |
| CORS Support | ✅ Enabled — safe for browser fetch() |
| Authentication | ⚠️ Requires apiKey — obtain credentials from the official documentation |
| Category | Finance |
- Endpoint:
- https://finnhub.io/docs/api
Quick Integration Code
⚠️ Auth: apiKey// ⚠️ This API requires apiKey authentication
// Add your credentials to the headers below
fetch("https://finnhub.io/docs/api")
.then(response => {
if (!response.ok) throw new Error(`HTTP ${response.status}`);
return response.json();
})
.then(data => console.log(data))
.catch(error => console.error("Request failed:", error));
# ⚠️ This API requires apiKey authentication
# Add your credentials to the headers dict below
import requests
url = "https://finnhub.io/docs/api"
headers = {
"Accept": "application/json",
# "Authorization": "Bearer YOUR_TOKEN_HERE",
}
response = requests.get(url, headers=headers, timeout=10)
response.raise_for_status()
data = response.json()
print(data)
curl -X GET "https://finnhub.io/docs/api" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Accept: application/json" \
-H "User-Agent: MyApp/1.0" \
--max-time 10 \
--silent | python3 -m json.tool
Sample JSON Response — Finance
Finance{
"symbol": "AAPL",
"name": "Apple Inc.",
"exchange": "NASDAQ",
"price": 189.43,
"change": 2.17,
"change_percent": "1.16%",
"volume": 58204100,
"market_cap": 2950000000000,
"fifty_two_week": {
"low": 124.17,
"high": 199.62
},
"timestamp": "2025-01-15T16:00:00Z"
}