symbolstringobrigatório
Stock ticker symbol (e.g., AAPL).
https://api.sandbase.ai/v1/api/yahoo-finance/historical-dataExtract historical OHLCV price data for a single ticker over a configurable date range and interval. Returns timestamped records suitable for charting and technical analysis.
Sua saída aparecerá aqui
Preencha as entradas e clique em Executar.
Returns historical price records for one stock ticker on Yahoo Finance. Each record has open, high, low, close and volume values with a timestamp. The only required input is symbol, and you can set range and interval to change the window and spacing.
open, high, low and close values.curl -X POST "https://api.sandbase.ai/v1/api/yahoo-finance/historical-data" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"symbol": "AAPL"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Stock ticker symbol (e.g., AAPL). |
interval | string | No | Data interval granularity. |
range | string | No | Date range for historical data. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"currency": "USD",
"history": [
{
"close": 269.04998779296875,
"high": 270.8500061035156,
"low": 266.25,
"open": 270.4200134277344,
"timestamp": 1762180200,
"volume": 50194600
}
],
"symbol": "AAPL"
},
"status": "success"
}
| Field | Meaning |
|---|---|
data.symbol | The ticker symbol the history belongs to, such as AAPL. |
data.currency | The currency code of the price values, such as USD. |
data.history[] | One price record per interval, listed in order from oldest to newest. |
data.history[].timestamp | The start time of the record as a Unix timestamp in seconds. |
data.history[].open / data.history[].close | The first and last price of the interval. |
data.history[].high / data.history[].low | The highest and lowest price reached during the interval. |
data.history[].volume | The number of shares traded during the interval. |
status | Shows success when the request worked. |
symbol is the stock ticker. If you do not know it, use Yahoo Finance Search Tickers to find it.timestamp values are Unix seconds. Convert them to dates before charting.$0.05 per successful call. Failed calls are not charged.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento de uso.
curl -X POST "https://api.sandbase.ai/v1/api/yahoo-finance/historical-data" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"symbol": "AAPL"
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
symbolstringobrigatórioStock ticker symbol (e.g., AAPL).
rangestringDate range for historical data.
intervalstringData interval granularity.
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
Nenhuma resposta salva foi publicada. Execute a API no Playground para inspecionar a resposta.
Explorar mais
| API | Preço | Resposta |
|---|---|---|
Yahoo Finance Historical DataEsta API Yahoo Finance | $0.05 por chamada | JSON assíncrono |
Yahoo Finance | A partir de $0.00099 por chamada | JSON |
Yahoo Finance | $0.05 por chamada | JSON assíncrono |
Yahoo Finance | A partir de $0.00099 por chamada | JSON |
Yahoo Finance | $0.05 por chamada | JSON assíncrono |
Yahoo Finance | $0.05 por chamada | JSON assíncrono |
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/yahoo-finance/historical-data com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.
$0.05 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.
Obrigatórios: symbol (string). Opcionais: range (string) e interval (string). A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Um resultado JSON. Este endpoint é assíncrono, então a resposta informa como buscar o resultado final. O README desta página inclui um exemplo de resposta.
Não. Yahoo Finance Historical Data funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do Yahoo Finance separadamente.