Stock price history API
Open, high, low, close, adjusted close and volume between two dates, daily to quarterly, with dividends and splits.
GET /v1/finance/history1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/finance/history?keyword=AAPL&start_date=2025-01-01&end_date=2025-06-30",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "symbol": "AAPL", "interval": "1d", "chart": { "meta": { "symbol": "AAPL", "currency": "USD", "exchangeName": "NMS", "fullExchangeName": "NasdaqGS", "instrumentType": "EQUITY", "firstTradeDate": 345479400, "regularMarketTime": 1795640402, "hasPrePostMarketData": true, "gmtoffset": -18000, "timezone": "EST", "exchangeTimezoneName": "America/New_York", "regularMarketPrice": 355.58, "regularMarketChangePercent": 0.426, "fulldayPrice": 355.58, "fulldayChange": 1.03, "fulldayChangePercent": 0.291, "fiftyTwoWeekHigh": 360.83, "fiftyTwoWeekLow": 243.42, "regularMarketDayHigh": 356.75, "regularMarketDayLow": 345.13, "regularMarketVolume": 53060252, "longName": "Apple Inc.", "shortName": "Apple Inc.", "chartPreviousClose": 250.42, "…": "5 more fields" }, "timestamp": [ 1735828200, 1735914600, "… 120 more" ], "indicators": { "quote": [ { "open": [ 248.92999267578125, 243.36000061035156, "… 120 more" ], "volume": [ 55740700, 40244100, "… 120 more" ], "low": [ 241.82000732421875, 241.88999938964844, "… 120 more" ], "high": [ 249.1000061035156, 244.17999267578125, "… 120 more" ], "close": [ 243.8500061035156, 243.36000061035156, "… 120 more" ] } ], "adjclose": [ { "adjclose": [ 241.90933227539065, 241.42323303222656, "… 120 more" ] } ] }, "events": { "dividends": { "1739197800": { "amount": 0.25, "date": 1739197800 }, "1747056600": { "amount": 0.26, "date": 1747056600 } } } }, "rows": [ { "date": "2025-01-02T14:30:00.000Z", "open": 248.92999267578125, "high": 249.1000061035156, "low": 241.82000732421875, "close": 243.8500061035156, "adjclose": 241.90933227539065, "volume": 55740700 }, { "date": "2025-01-03T14:30:00.000Z", "open": 243.36000061035156, "high": 244.17999267578125, "low": 241.88999938964844, "close": 243.36000061035156, "adjclose": 241.42323303222656, "volume": 40244100 }, "… 120 more" ]}Parameters
| Name | Type | Description |
|---|---|---|
keywordquery · required | string | A ticker (AAPL, ^GSPC, EURUSD=X, BTC-USD) or a company name. Example: AAPL. |
start_datequery · required | string | YYYY-MM-DD. |
end_datequery · required | string | YYYY-MM-DD. |
intervalquery | "1d" | "5d" | "1wk" | "1mo" | "3mo" | One of 1d, 5d, 1wk, 1mo, 3mo. |
Response fields
200 with a FinanceHistory, in Finance’s own JSON.
| Field | Type | Description |
|---|---|---|
symbol | string | |
interval | string | |
chart | FinanceChart | |
rows | object[] |
Status codes
| Status | Meaning |
|---|---|
200 | Price rows, oldest first, and the raw chart. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No ticker or data matches. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Finance is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
Which intervals?
1d, 5d, 1wk, 1mo and 3mo.
Finance is a trademark of Yahoo Inc. We are not affiliated with or endorsed by Yahoo Inc.