Yahoo Finance API endpoint
Returns capital gain events for a Yahoo Finance `symbol`, mainly ETFs and mutual funds such as `SPY`, each with a Unix timestamp and an amount, when Yahoo provides them. The response object also has `dividends` and `splits` fields.
/yahoo-finance/ticker/{symbol}/capital-gains| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| symbol (path) | string | Yes | Yahoo Finance symbol such as SPY | SPY | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/yahoo-finance/ticker/SPY/capital-gains" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"capital_gains": [
{
"timestamp": 1766102400,
"amount": 1.23
}
]
}
}Request schema
No body schema
Response schema
#/definitions/yahoofinance.actionsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | yahoofinance.ActionEvents | No | ||||
| data.capital_gains | array | No | Capital gain distributions in the period. | |||
| data.dividends | array | No | Dividend payments in the period. | |||
| data.splits | array | No | Stock splits in the period. | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 404 | Not Found | #/definitions/app.Response |
| 500 | Internal Server Error | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/yahoo-finance/ticker/SPY/capital-gains" \
-H "x-api-key: $CRAWLORA_API_KEY"