Finnhub API

⭐ Beginner's Pick Finance / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

Finnhub is a popular financial API offering real-time stock quotes, company fundamentals, news, forex rates, and cryptocurrency data through both REST and WebSocket connections. It has a generous free tier with a high rate limit, making it one of the best options for developers building stock market apps. The documentation is excellent and it supports many programming languages with official client libraries.

💡

Beginner Tip

Finnhub's free tier allows 60 API calls per minute, which is plenty for getting started — use the /quote endpoint first to get a stock's current price and verify your key works. Sign up at finnhub.io to get your free API key instantly without needing a credit card.

Available Data

coin price in USD/EUR
market capitalization
24h price change
trading volume
circulating supply
stock price and symbol

Example Response

JSON Response
{
  "id": "bitcoin",
  "symbol": "btc",
  "current_price": 65432.1,
  "market_cap": 1280000000000,
  "price_change_24h": 1250.5,
  "price_change_percentage_24h": 1.95,
  "total_volume": 28500000000
}

Field Reference

c Current price of the stock.
h High price of the stock during the current trading day.
l Low price of the stock during the current trading day.
o Opening price of the stock at the start of the current trading day.
pc Previous closing price — useful as a fallback when markets are closed.
t Unix timestamp of the last price update.

Implementation Example

// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://finnhub.io/docs/api";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized The API token is missing or incorrect.
Add the token as a query parameter: ?token=YOUR_API_KEY, or use the Authorization header: "Authorization: Bearer YOUR_API_KEY".
429 Too Many Requests You have exceeded the 60 calls/minute rate limit on the free tier.
Add a delay between requests or cache frequently-requested data locally — stock quotes do not need to be fetched more than once per minute for most use cases.
Empty or null data fields The requested symbol is not covered by Finnhub or markets are closed.
Check that the symbol is a valid US stock ticker. Outside market hours, some real-time fields may be null — use the "pc" (previous close) field as a fallback.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Finance
Difficulty Intermediate
Verified: 2026-04-04

Alternatives to Finnhub

Technical alternatives for different use cases.

Extensive technical indicators and forex coverage

Better For

Technical analysis with 50+ indicator functions

Trade-off

Real-time WebSocket streaming

Comprehensive financial data from IEX exchange

Better For

Company fundamentals and financial statements

Trade-off

Global market coverage beyond US equities

Free WebSocket for real-time prices, plus company profiles

Better For

Batch historical data retrieval

Trade-off

Real-time price updates and company fundamentals

Real-time and historical market data with WebSocket

Better For

Institutional-grade market data with low latency

Trade-off

Free tier availability and pricing

Similar APIs

View All →