Overview
Polygon.io is a comprehensive market data API providing real-time and historical stock, forex, and cryptocurrency data. You can retrieve OHLCV price bars, live quotes, trade data, and company fundamentals for thousands of tickers. It is a popular choice for developers building trading algorithms, financial dashboards, and quantitative research tools.
Beginner Tip
The free tier provides access to previous-day data with a 15-minute delay; upgrade to a paid plan for real-time streaming or intraday data if your app requires live prices.
Available Data
The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.
Example Response
Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.
{
"base": "USD",
"date": "2025-01-15",
"rates": {
"EUR": 0.92,
"GBP": 0.79,
"JPY": 149.5,
"CAD": 1.35
}
} Field Reference
ticker The stock ticker symbol for the requested security. results Array of OHLCV bar objects for the requested time range. o Opening price of the security for the given time interval. h Highest price reached during the time interval. c Closing price of the security at the end of the time interval. v Total trading volume (number of shares) during the time interval. Implementation Example
Calls a real endpoint of this API. Replace any placeholder credentials with your own key.
// Get daily stock aggregates (OHLCV)
const url = "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2023-01-09/2023-01-10?apiKey=YOUR_API_KEY";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(`Symbol: ${data.ticker}`);
console.log(`Results count: ${data.resultsCount}`);
data.results.forEach(bar => {
console.log(`Date: ${new Date(bar.t)}, Open: $${bar.o}, High: $${bar.h}, Low: $${bar.l}, Close: $${bar.c}, Volume: ${bar.v}`);
}); 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
Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.
Metadata Score Breakdown
Estimated from metadata — endpoint not independently tested
Metadata estimate · endpoint not independently tested
Technical Specifications
Alternatives to Polygon
Technical alternatives for different use cases.
Real-time and historical market data with WebSocket
Free tier availability and pricing
Institutional-grade market data with low latency
Similar APIs
View All →Alpha Vantage
⭐ Beginner's PickAlpha Vantage delivers free real-time and historical stock, forex, and cryptocurrency data through a simple REST API.
Yahoo Finance
Yahoo Finance provides unofficial access to stock quotes, historical prices, currency exchange rates, and cryptocurrency data through community-maintained libraries and endpoints.
Finnhub
⭐ Beginner's PickFinnhub is a popular financial API offering real-time stock quotes, company fundamentals, news, forex rates, and cryptocurrency data through both REST and WebSocket connections.
Twelve Data
⭐ Beginner's PickTwelve Data provides real-time and historical stock, forex, cryptocurrency, and ETF market data through a clean and well-documented REST API.
Binlist
⭐ Beginner's PickBinlist gives you free access to a database of Bank Identification Numbers (BINs), the first 6-8 digits of any credit or debit card number that identify the issuing bank and card type.