Sand AISand AI MAGI-2MAGI-2 теперь на SandBase: видео 1080p с нативным звукомПопробовать сейчас

Yahoo Finance Historical Data

Документация 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.

Цена
$0.05USD / вызов
Метод
POST
Ответ
Асинхронный JSON
Параметры
1 обязательных · 2 необязательных

Песочница

Ввод
Stock ticker symbol (e.g., AAPL).
Date range for historical data.
Data interval granularity.
ВыходГотово

Ваш результат появится здесь

Заполните входные данные, затем нажмите «Запустить».

README по 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.

Посмотреть больше

Связанные APIs

Все APIs
APIЦенаОтвет
Yahoo Finance$0.05 за запросАсинхронный JSON
Yahoo FinanceОт $0.00099 за запросJSON
Yahoo Finance$0.05 за запросАсинхронный JSON
Yahoo FinanceОт $0.00099 за запросJSON
Yahoo Finance$0.05 за запросАсинхронный JSON
Yahoo Finance$0.05 за запросАсинхронный JSON

Вопросы

FAQ

Как использовать API Yahoo Finance Historical Data?

Отправьте POST-запрос на https://api.sandbase.ai/v1/api/yahoo-finance/historical-data, указав ключ SandBase API в заголовке Authorization (Bearer), а параметры — в теле JSON. Вы также можете попробовать это в Playground на этой странице без написания кода.

Сколько стоит API Yahoo Finance Historical Data?

$0.05 за вызов, списывается с баланса SandBase. Оплата взимается только за сделанные вызовы; подписка не требуется.

Какие параметры принимает API Yahoo Finance Historical Data?

Обязательные: symbol (string). Необязательные: range (string) и interval (string). В таблице Parameters и в Playground на этой странице перечислены все поля.

Что возвращает API Yahoo Finance Historical Data?

JSON-результат. Этот endpoint работает асинхронно, поэтому ответ подсказывает, как получить готовый результат. В README на этой странице приведен пример ответа.

Нужен ли мне аккаунт разработчика Yahoo Finance или API key?

Нет. Yahoo Finance Historical Data работает через SandBase, поэтому один API key SandBase покрывает этот endpoint и все остальные API и модели в каталоге. Вам не нужно отдельно запрашивать доступ к API Yahoo Finance.