Sand AISand AI MAGI-2MAGI-2 agora está na SandBase: vídeo em 1080p com áudio nativoExperimente agora

Yahoo Finance Historical Data

Docs da API
https://api.sandbase.ai/v1/api/yahoo-finance/historical-data

Extract historical OHLCV price data for a single ticker over a configurable date range and interval. Returns timestamped records suitable for charting and technical analysis.

Preço
$0.05USD / chamada
Método
POST
Resposta
JSON assíncrono
Parâmetros
1 obrigatórios · 2 opcionais

Playground

Entrada
Stock ticker symbol (e.g., AAPL).
Date range for historical data.
Data interval granularity.
SaídaPronto

Sua saída aparecerá aqui

Preencha as entradas e clique em Executar.

README da API

Yahoo Finance Historical Data

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.

Use cases

  • Plot a candlestick chart for AAPL from the returned open, high, low and close values.
  • Compute moving averages or other technical indicators over the closing price series.
  • Compare trading volume across days to spot unusually active sessions.
  • Export daily price history for a ticker into a spreadsheet or backtesting tool.

Request

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.

Parameters

NameTypeRequiredDescription
symbolstringYesStock ticker symbol (e.g., AAPL).
intervalstringNoData interval granularity.
rangestringNoDate range for historical data.

Example response

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"
}

Response fields

FieldMeaning
data.symbolThe ticker symbol the history belongs to, such as AAPL.
data.currencyThe 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[].timestampThe start time of the record as a Unix timestamp in seconds.
data.history[].open / data.history[].closeThe first and last price of the interval.
data.history[].high / data.history[].lowThe highest and lowest price reached during the interval.
data.history[].volumeThe number of shares traded during the interval.
statusShows success when the request worked.

Notes

  • 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.
  • Price values are floats with many decimal places. Round them for display.
  • For the latest price instead of a series, call Yahoo Finance Quote.

Pricing

$0.05 per successful call. Failed calls are not charged.

Explorar mais

APIs relacionadas

Todas as APIs
APIPreçoResposta
Yahoo Finance$0.05 por chamadaJSON assíncrono
Yahoo FinanceA partir de $0.00099 por chamadaJSON
Yahoo Finance$0.05 por chamadaJSON assíncrono
Yahoo FinanceA partir de $0.00099 por chamadaJSON
Yahoo Finance$0.05 por chamadaJSON assíncrono
Yahoo Finance$0.05 por chamadaJSON assíncrono

Perguntas

FAQ

Como eu uso a API Yahoo Finance Historical Data?

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.

Quanto custa a API Yahoo Finance Historical Data?

$0.05 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.

Quais parâmetros a API Yahoo Finance Historical Data aceita?

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.

O que a API Yahoo Finance Historical Data retorna?

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.

Preciso de uma conta de desenvolvedor Yahoo Finance ou de uma chave de API?

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.