Stock OHLCV bars by ticker and date range, any interval
polygon.aggs.rangeOHLCV bars for a ticker at any granularity (minute to year) over a date range — Polygon's workhorse endpoint
- Price
- Prix à venirAu prix du fournisseur
- Success rate
- —Aucune donnée de taux de réussite pour le momentLast 30 days · 0 calls
- Latency p50
- ——
- Last verified
- 15 août 2026Verified working
GEThttps://toolswitch.dev/v1/tools/polygon.aggs.range?to=2026-08-14&from=2026-08-01&limit=5&ticker=AAPL×pan=day&multiplier=1PreviewTry onlineBientôtProvider docs ↗
- Uses platform quota
- Synchronous response
- Reads public data
Paramètres
| Paramètre | Type | Obligatoire | Description | Exemple |
|---|---|---|---|---|
| Paramètres de requête | ||||
to | chaîne | Obligatoire | path parameter — YYYY-MM-DD | 2026-08-14 |
from | chaîne | Obligatoire | path parameter — YYYY-MM-DD | 2026-08-01 |
sort | chaîne | Facultatif | asc | desc | |
limit | entier | Facultatif | max 50000 | 5 |
ticker | chaîne | Obligatoire | path parameter | AAPL |
adjusted | booléen | Facultatif | ||
timespan | chaîne | Obligatoire | path parameter — minute | hour | day | week | month | quarter | year | day |
multiplier | entier | Obligatoire | path parameter — bar size multiplier | 1 |
- Paramètres de requête
tochaîneObligatoirepath parameter — YYYY-MM-DD
Exemple :
2026-08-14fromchaîneObligatoirepath parameter — YYYY-MM-DD
Exemple :
2026-08-01sortchaîneFacultatifasc | desc
limitentierFacultatifmax 50000
Exemple :
5tickerchaîneObligatoirepath parameter
Exemple :
AAPLadjustedbooléenFacultatiftimespanchaîneObligatoirepath parameter — minute | hour | day | week | month | quarter | year
Exemple :
daymultiplierentierObligatoirepath parameter — bar size multiplier
Exemple :
1
Exemples de code
Remplacez $TOOLSWITCH_KEY par la clé créée dans la console.
Preview
curl -X GET 'https://toolswitch.dev/v1/tools/polygon.aggs.range?to=2026-08-14&from=2026-08-01&limit=5&ticker=AAPL×pan=day&multiplier=1' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/polygon.aggs.range?to=2026-08-14&from=2026-08-01&limit=5&ticker=AAPL×pan=day&multiplier=1",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/polygon.aggs.range?to=2026-08-14&from=2026-08-01&limit=5&ticker=AAPL×pan=day&multiplier=1", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Cette API de passerelle est en préversion ; son URL et son authentification peuvent changer. Les paramètres de l’exemple sont des données fictives.