GET /v1/splits
GET /v1/splits
Returns stock split events for a single symbol. Forward and reverse splits are
distinguished by the relative magnitude of ratio_from and ratio_to. See
corporate actions for the convention.
Request
GET /v1/splits?symbol=AAPL HTTP/1.1Host: api.oneapi.financeAuthorization: Bearer oa_live_<your_key>Query parameters
| Param | Type | Required | Notes |
|---|---|---|---|
symbol | string | yes | Single symbol. |
start_date | ISO date | no | Inclusive lower bound. |
end_date | ISO date | no | Inclusive upper bound. Default now. |
outputsize | int | no | Cap 5,000. Defaults to all events. |
Response
{ "symbol": "AAPL", "splits": [ { "date": "2020-08-31", "ratio_from": 1.0, "ratio_to": 4.0 }, { "date": "2014-06-09", "ratio_from": 1.0, "ratio_to": 7.0 }, { "date": "2005-02-28", "ratio_from": 1.0, "ratio_to": 2.0 }, { "date": "2000-06-21", "ratio_from": 1.0, "ratio_to": 2.0 }, { "date": "1987-06-16", "ratio_from": 1.0, "ratio_to": 2.0 } ]}Field reference
| Field | Type | Notes |
|---|---|---|
symbol | string | Echo of the request, normalized. |
splits | array | Events in descending chronological order. |
splits[].date | string | ISO date the split took effect. |
splits[].ratio_from | number | Pre-split share count baseline. |
splits[].ratio_to | number | Post-split share count for the same baseline. |
Read ratio_from : ratio_to as “every ratio_from shares became ratio_to shares”.
A 4-for-1 forward split is 1.0 : 4.0. A 1-for-10 reverse split is 10.0 : 1.0.
The wire-format model is
oneapi_core.responses.splits.SplitsResponse.
Examples
curl -H "Authorization: Bearer oa_live_..." \ "https://api.oneapi.finance/v1/splits?symbol=AAPL"import httpx, os
r = httpx.get( "https://api.oneapi.finance/v1/splits", params={"symbol": "AAPL"}, headers={"Authorization": f"Bearer {os.environ['ONEAPI_KEY']}"}, timeout=10.0,)r.raise_for_status()
for sp in r.json()["splits"]: kind = "forward" if sp["ratio_to"] > sp["ratio_from"] else "reverse" print(f"{sp['date']}: {sp['ratio_from']}-for-{sp['ratio_to']} {kind}")const r = await fetch( "https://api.oneapi.finance/v1/splits?symbol=AAPL", { headers: { Authorization: `Bearer ${process.env.ONEAPI_KEY}` } },);const { splits } = await r.json();for (const sp of splits) { const kind = sp.ratio_to > sp.ratio_from ? "forward" : "reverse"; console.log(`${sp.date}: ${sp.ratio_from}-for-${sp.ratio_to} ${kind}`);}Errors
| Status | code | When |
|---|---|---|
| 401 | unauthenticated | Missing or invalid API key. |
| 404 | not_found | Symbol unknown. |
| 429 | rate_limit | See rate limits. |
| 502 | upstream_failure | All sources failed. |
See also
- Corporate actions — split adjustment semantics.
GET /v1/time_series— split-adjusted historical bars.