Polygon API

Finance / API Key Intermediate HTTPS
5 calls/minute (free tier)

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.

Symbol
Results count
Date
exchange rate between currencies
conversion result
supported currency list

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.

JSON Response · Illustrative
{
  "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.

Request
// 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.

403 Forbidden Your API key does not have access to the requested endpoint or data tier
Check which endpoints are included in your Polygon plan; some data like real-time quotes require a paid subscription.
404 Not Found The ticker symbol does not exist or is formatted incorrectly
Use uppercase ticker symbols (e.g., AAPL not aapl) and verify the ticker is traded on a supported exchange.
429 Too Many Requests API request rate limit exceeded for your subscription tier
Implement request throttling and use the Retry-After header value to determine when to retry requests.

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Finance
Difficulty Intermediate
Listing details not endpoint-verified

Alternatives to Polygon

Technical alternatives for different use cases.

Real-time and historical market data with WebSocket

Better For

Free tier availability and pricing

Trade-off

Institutional-grade market data with low latency

Similar APIs

View All →